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_LENGTH
</tt> </td><td>Data is sent with Content-Length
</td></tr>
116 </tbody></table></div>
118 <h3 class='title'
><a name='http_encryption_e'
>http_encryption_e
</a></h3>
120 <p>HTTP encryption values
</p>
122 <div class='table'
><table align='center' border='
1' width='
80%'
>
123 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
125 <tr><td><tt>HTTP_ENCRYPT_ALWAYS
</tt> </td><td>Always encrypt (SSL)
</td></tr>
126 <tr><td><tt>HTTP_ENCRYPT_IF_REQUESTED
</tt> </td><td>Encrypt if requested (TLS upgrade)
</td></tr>
127 <tr><td><tt>HTTP_ENCRYPT_NEVER
</tt> </td><td>Never encrypt
</td></tr>
128 <tr><td><tt>HTTP_ENCRYPT_REQUIRED
</tt> </td><td>Encryption is required (TLS upgrade)
</td></tr>
129 </tbody></table></div>
131 <h3 class='title'
><a name='http_field_e'
>http_field_e
</a></h3>
133 <p>HTTP field names
</p>
135 <div class='table'
><table align='center' border='
1' width='
80%'
>
136 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
138 <tr><td><tt>HTTP_FIELD_ACCEPT_LANGUAGE
</tt> </td><td>Accept-Language field
</td></tr>
139 <tr><td><tt>HTTP_FIELD_ACCEPT_RANGES
</tt> </td><td>Accept-Ranges field
</td></tr>
140 <tr><td><tt>HTTP_FIELD_AUTHORIZATION
</tt> </td><td>Authorization field
</td></tr>
141 <tr><td><tt>HTTP_FIELD_CONNECTION
</tt> </td><td>Connection field
</td></tr>
142 <tr><td><tt>HTTP_FIELD_CONTENT_ENCODING
</tt> </td><td>Content-Encoding field
</td></tr>
143 <tr><td><tt>HTTP_FIELD_CONTENT_LANGUAGE
</tt> </td><td>Content-Language field
</td></tr>
144 <tr><td><tt>HTTP_FIELD_CONTENT_LENGTH
</tt> </td><td>Content-Length field
</td></tr>
145 <tr><td><tt>HTTP_FIELD_CONTENT_LOCATION
</tt> </td><td>Content-Location field
</td></tr>
146 <tr><td><tt>HTTP_FIELD_CONTENT_MD5
</tt> </td><td>Content-MD5 field
</td></tr>
147 <tr><td><tt>HTTP_FIELD_CONTENT_RANGE
</tt> </td><td>Content-Range field
</td></tr>
148 <tr><td><tt>HTTP_FIELD_CONTENT_TYPE
</tt> </td><td>Content-Type field
</td></tr>
149 <tr><td><tt>HTTP_FIELD_CONTENT_VERSION
</tt> </td><td>Content-Version field
</td></tr>
150 <tr><td><tt>HTTP_FIELD_DATE
</tt> </td><td>Date field
</td></tr>
151 <tr><td><tt>HTTP_FIELD_HOST
</tt> </td><td>Host field
</td></tr>
152 <tr><td><tt>HTTP_FIELD_IF_MODIFIED_SINCE
</tt> </td><td>If-Modified-Since field
</td></tr>
153 <tr><td><tt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</tt> </td><td>If-Unmodified-Since field
</td></tr>
154 <tr><td><tt>HTTP_FIELD_KEEP_ALIVE
</tt> </td><td>Keep-Alive field
</td></tr>
155 <tr><td><tt>HTTP_FIELD_LAST_MODIFIED
</tt> </td><td>Last-Modified field
</td></tr>
156 <tr><td><tt>HTTP_FIELD_LINK
</tt> </td><td>Link field
</td></tr>
157 <tr><td><tt>HTTP_FIELD_LOCATION
</tt> </td><td>Location field
</td></tr>
158 <tr><td><tt>HTTP_FIELD_MAX
</tt> </td><td>Maximum field index
</td></tr>
159 <tr><td><tt>HTTP_FIELD_RANGE
</tt> </td><td>Range field
</td></tr>
160 <tr><td><tt>HTTP_FIELD_REFERER
</tt> </td><td>Referer field
</td></tr>
161 <tr><td><tt>HTTP_FIELD_RETRY_AFTER
</tt> </td><td>Retry-After field
</td></tr>
162 <tr><td><tt>HTTP_FIELD_TRANSFER_ENCODING
</tt> </td><td>Transfer-Encoding field
</td></tr>
163 <tr><td><tt>HTTP_FIELD_UNKNOWN
</tt> </td><td>Unknown field
</td></tr>
164 <tr><td><tt>HTTP_FIELD_UPGRADE
</tt> </td><td>Upgrade field
</td></tr>
165 <tr><td><tt>HTTP_FIELD_USER_AGENT
</tt> </td><td>User-Agent field
</td></tr>
166 <tr><td><tt>HTTP_FIELD_WWW_AUTHENTICATE
</tt> </td><td>WWW-Authenticate field
</td></tr>
167 </tbody></table></div>
169 <h3 class='title'
><a name='http_keepalive_e'
>http_keepalive_e
</a></h3>
171 <p>Types and structures...
</p>
173 <div class='table'
><table align='center' border='
1' width='
80%'
>
174 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
176 <tr><td><tt>HTTP_KEEPALIVE_OFF
</tt> </td><td>No keep alive support
</td></tr>
177 <tr><td><tt>HTTP_KEEPALIVE_ON
</tt> </td><td>Use keep alive
</td></tr>
178 </tbody></table></div>
180 <h3 class='title'
><a name='http_status_e'
>http_status_e
</a></h3>
182 <p>HTTP status codes
</p>
184 <div class='table'
><table align='center' border='
1' width='
80%'
>
185 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
187 <tr><td><tt>HTTP_ACCEPTED
</tt> </td><td>DELETE command was successful
</td></tr>
188 <tr><td><tt>HTTP_BAD_GATEWAY
</tt> </td><td>Bad gateway
</td></tr>
189 <tr><td><tt>HTTP_BAD_REQUEST
</tt> </td><td>Bad request
</td></tr>
190 <tr><td><tt>HTTP_CONFLICT
</tt> </td><td>Request is self-conflicting
</td></tr>
191 <tr><td><tt>HTTP_CONTINUE
</tt> </td><td>Everything OK, keep going...
</td></tr>
192 <tr><td><tt>HTTP_CREATED
</tt> </td><td>PUT command was successful
</td></tr>
193 <tr><td><tt>HTTP_ERROR
</tt> </td><td>An error response from httpXxxx()
</td></tr>
194 <tr><td><tt>HTTP_EXPECTATION_FAILED
</tt> </td><td>The expectation given in an Expect header field was not met
</td></tr>
195 <tr><td><tt>HTTP_FORBIDDEN
</tt> </td><td>Forbidden to access this URI
</td></tr>
196 <tr><td><tt>HTTP_GATEWAY_TIMEOUT
</tt> </td><td>Gateway connection timed out
</td></tr>
197 <tr><td><tt>HTTP_GONE
</tt> </td><td>Server has gone away
</td></tr>
198 <tr><td><tt>HTTP_LENGTH_REQUIRED
</tt> </td><td>A content length or encoding is required
</td></tr>
199 <tr><td><tt>HTTP_METHOD_NOT_ALLOWED
</tt> </td><td>Method is not allowed
</td></tr>
200 <tr><td><tt>HTTP_MOVED_PERMANENTLY
</tt> </td><td>Document has moved permanently
</td></tr>
201 <tr><td><tt>HTTP_MOVED_TEMPORARILY
</tt> </td><td>Document has moved temporarily
</td></tr>
202 <tr><td><tt>HTTP_MULTIPLE_CHOICES
</tt> </td><td>Multiple files match request
</td></tr>
203 <tr><td><tt>HTTP_NOT_ACCEPTABLE
</tt> </td><td>Not Acceptable
</td></tr>
204 <tr><td><tt>HTTP_NOT_AUTHORITATIVE
</tt> </td><td>Information isn't authoritative
</td></tr>
205 <tr><td><tt>HTTP_NOT_FOUND
</tt> </td><td>URI was not found
</td></tr>
206 <tr><td><tt>HTTP_NOT_IMPLEMENTED
</tt> </td><td>Feature not implemented
</td></tr>
207 <tr><td><tt>HTTP_NOT_MODIFIED
</tt> </td><td>File not modified
</td></tr>
208 <tr><td><tt>HTTP_NOT_SUPPORTED
</tt> </td><td>HTTP version not supported
</td></tr>
209 <tr><td><tt>HTTP_NO_CONTENT
</tt> </td><td>Successful command, no new data
</td></tr>
210 <tr><td><tt>HTTP_OK
</tt> </td><td>OPTIONS/GET/HEAD/POST/TRACE command was successful
</td></tr>
211 <tr><td><tt>HTTP_PARTIAL_CONTENT
</tt> </td><td>Only a partial file was recieved/sent
</td></tr>
212 <tr><td><tt>HTTP_PAYMENT_REQUIRED
</tt> </td><td>Payment required
</td></tr>
213 <tr><td><tt>HTTP_PRECONDITION
</tt> </td><td>Precondition failed
</td></tr>
214 <tr><td><tt>HTTP_PROXY_AUTHENTICATION
</tt> </td><td>Proxy Authentication is Required
</td></tr>
215 <tr><td><tt>HTTP_REQUESTED_RANGE
</tt> </td><td>The requested range is not satisfiable
</td></tr>
216 <tr><td><tt>HTTP_REQUEST_TIMEOUT
</tt> </td><td>Request timed out
</td></tr>
217 <tr><td><tt>HTTP_REQUEST_TOO_LARGE
</tt> </td><td>Request entity too large
</td></tr>
218 <tr><td><tt>HTTP_RESET_CONTENT
</tt> </td><td>Content was reset/recreated
</td></tr>
219 <tr><td><tt>HTTP_SEE_OTHER
</tt> </td><td>See this other link...
</td></tr>
220 <tr><td><tt>HTTP_SERVER_ERROR
</tt> </td><td>Internal server error
</td></tr>
221 <tr><td><tt>HTTP_SERVICE_UNAVAILABLE
</tt> </td><td>Service is unavailable
</td></tr>
222 <tr><td><tt>HTTP_SWITCHING_PROTOCOLS
</tt> </td><td>HTTP upgrade to TLS/SSL
</td></tr>
223 <tr><td><tt>HTTP_UNAUTHORIZED
</tt> </td><td>Unauthorized to access host
</td></tr>
224 <tr><td><tt>HTTP_UNSUPPORTED_MEDIATYPE
</tt> </td><td>The requested media type is unsupported
</td></tr>
225 <tr><td><tt>HTTP_UPGRADE_REQUIRED
</tt> </td><td>Upgrade to SSL/TLS required
</td></tr>
226 <tr><td><tt>HTTP_URI_TOO_LONG
</tt> </td><td>URI too long
</td></tr>
227 <tr><td><tt>HTTP_USE_PROXY
</tt> </td><td>Must use a proxy to access this URI
</td></tr>
228 </tbody></table></div>
230 <h3 class='title'
><a name='ipp_res_e'
>ipp_res_e
</a></h3>
232 <p>Types and structures...
</p>
234 <div class='table'
><table align='center' border='
1' width='
80%'
>
235 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
237 <tr><td><tt>IPP_RES_PER_CM
</tt> </td><td>Pixels per centimeter
</td></tr>
238 <tr><td><tt>IPP_RES_PER_INCH
</tt> </td><td>Pixels per inch
</td></tr>
239 </tbody></table></div>
241 <h3 class='title'
><a name='ipp_status_e'
>ipp_status_e
</a></h3>
243 <p>IPP status codes...
</p>
245 <div class='table'
><table align='center' border='
1' width='
80%'
>
246 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
248 <tr><td><tt>IPP_ATTRIBUTES
</tt> </td><td>client-error-attributes-or-values-not-supported
</td></tr>
249 <tr><td><tt>IPP_ATTRIBUTES_NOT_SETTABLE
</tt> </td><td>client-error-attributes-not-settable
</td></tr>
250 <tr><td><tt>IPP_BAD_REQUEST
</tt> </td><td>client-error-bad-request
</td></tr>
251 <tr><td><tt>IPP_CHARSET
</tt> </td><td>client-error-charset-not-supported
</td></tr>
252 <tr><td><tt>IPP_COMPRESSION_ERROR
</tt> </td><td>client-error-compression-error
</td></tr>
253 <tr><td><tt>IPP_COMPRESSION_NOT_SUPPORTED
</tt> </td><td>client-error-compression-not-supported
</td></tr>
254 <tr><td><tt>IPP_CONFLICT
</tt> </td><td>client-error-conflicting-attributes
</td></tr>
255 <tr><td><tt>IPP_DEVICE_ERROR
</tt> </td><td>server-error-device-error
</td></tr>
256 <tr><td><tt>IPP_DOCUMENT_ACCESS_ERROR
</tt> </td><td>client-error-document-access-error
</td></tr>
257 <tr><td><tt>IPP_DOCUMENT_FORMAT
</tt> </td><td>client-error-document-format-not-supported
</td></tr>
258 <tr><td><tt>IPP_DOCUMENT_FORMAT_ERROR
</tt> </td><td>client-error-document-format-error
</td></tr>
259 <tr><td><tt>IPP_ERROR_JOB_CANCELLED
</tt> </td><td>server-error-job-canceled
</td></tr>
260 <tr><td><tt>IPP_FORBIDDEN
</tt> </td><td>client-error-forbidden
</td></tr>
261 <tr><td><tt>IPP_GONE
</tt> </td><td>client-error-gone
</td></tr>
262 <tr><td><tt>IPP_IGNORED_ALL_NOTIFICATIONS
</tt> </td><td>client-error-ignored-all-notifications
</td></tr>
263 <tr><td><tt>IPP_IGNORED_ALL_SUBSCRIPTIONS
</tt> </td><td>client-error-ignored-all-subscriptions
</td></tr>
264 <tr><td><tt>IPP_INTERNAL_ERROR
</tt> </td><td>server-error-internal-error
</td></tr>
265 <tr><td><tt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED
</tt> </td><td>server-error-multiple-document-jobs-not-supported
</td></tr>
266 <tr><td><tt>IPP_NOT_ACCEPTING
</tt> </td><td>server-error-not-accepting-jobs
</td></tr>
267 <tr><td><tt>IPP_NOT_AUTHENTICATED
</tt> </td><td>client-error-not-authenticated
</td></tr>
268 <tr><td><tt>IPP_NOT_AUTHORIZED
</tt> </td><td>client-error-not-authorized
</td></tr>
269 <tr><td><tt>IPP_NOT_FOUND
</tt> </td><td>client-error-not-found
</td></tr>
270 <tr><td><tt>IPP_NOT_POSSIBLE
</tt> </td><td>client-error-not-possible
</td></tr>
271 <tr><td><tt>IPP_OK
</tt> </td><td>successful-ok
</td></tr>
272 <tr><td><tt>IPP_OK_BUT_CANCEL_SUBSCRIPTION
</tt> </td><td>successful-ok-but-cancel-subscription
</td></tr>
273 <tr><td><tt>IPP_OK_CONFLICT
</tt> </td><td>successful-ok-conflicting-attributes
</td></tr>
274 <tr><td><tt>IPP_OK_EVENTS_COMPLETE
</tt> </td><td>successful-ok-events-complete
</td></tr>
275 <tr><td><tt>IPP_OK_IGNORED_NOTIFICATIONS
</tt> </td><td>successful-ok-ignored-notifications
</td></tr>
276 <tr><td><tt>IPP_OK_IGNORED_SUBSCRIPTIONS
</tt> </td><td>successful-ok-ignored-subscriptions
</td></tr>
277 <tr><td><tt>IPP_OK_SUBST
</tt> </td><td>successful-ok-ignored-or-substituted-attributes
</td></tr>
278 <tr><td><tt>IPP_OK_TOO_MANY_EVENTS
</tt> </td><td>successful-ok-too-many-events
</td></tr>
279 <tr><td><tt>IPP_OPERATION_NOT_SUPPORTED
</tt> </td><td>server-error-operation-not-supported
</td></tr>
280 <tr><td><tt>IPP_PRINTER_BUSY
</tt> </td><td>server-error-busy
</td></tr>
281 <tr><td><tt>IPP_PRINTER_IS_DEACTIVATED
</tt> </td><td>server-error-printer-is-deactivated
</td></tr>
282 <tr><td><tt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND
</tt> </td><td>client-error-print-support-file-not-found
</td></tr>
283 <tr><td><tt>IPP_REDIRECTION_OTHER_SITE
</tt> </td><td></td></tr>
284 <tr><td><tt>IPP_REQUEST_ENTITY
</tt> </td><td>client-error-request-entity-too-large
</td></tr>
285 <tr><td><tt>IPP_REQUEST_VALUE
</tt> </td><td>client-error-request-value-too-long
</td></tr>
286 <tr><td><tt>IPP_SERVICE_UNAVAILABLE
</tt> </td><td>server-error-service-unavailable
</td></tr>
287 <tr><td><tt>IPP_TEMPORARY_ERROR
</tt> </td><td>server-error-temporary-error
</td></tr>
288 <tr><td><tt>IPP_TIMEOUT
</tt> </td><td>client-error-timeout
</td></tr>
289 <tr><td><tt>IPP_TOO_MANY_SUBSCRIPTIONS
</tt> </td><td>client-error-too-many-subscriptions
</td></tr>
290 <tr><td><tt>IPP_URI_SCHEME
</tt> </td><td>client-error-uri-scheme-not-supported
</td></tr>
291 <tr><td><tt>IPP_VERSION_NOT_SUPPORTED
</tt> </td><td>server-error-version-not-supported
</td></tr>
292 </tbody></table></div>
294 <h3 class='title'
><a name='ipp_tag_e'
>ipp_tag_e
</a></h3>
296 <p>Format tags for attributes...
</p>
298 <div class='table'
><table align='center' border='
1' width='
80%'
>
299 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
301 <tr><td><tt>IPP_TAG_ADMINDEFINE
</tt> </td><td>Admin-defined value
</td></tr>
302 <tr><td><tt>IPP_TAG_BEGIN_COLLECTION
</tt> </td><td>Beginning of collection value
</td></tr>
303 <tr><td><tt>IPP_TAG_BOOLEAN
</tt> </td><td>Boolean value
</td></tr>
304 <tr><td><tt>IPP_TAG_CHARSET
</tt> </td><td>Character set value
</td></tr>
305 <tr><td><tt>IPP_TAG_COPY
</tt> </td><td>Bitflag for copied attribute values
</td></tr>
306 <tr><td><tt>IPP_TAG_DATE
</tt> </td><td>Date/time value
</td></tr>
307 <tr><td><tt>IPP_TAG_DEFAULT
</tt> </td><td>Default value
</td></tr>
308 <tr><td><tt>IPP_TAG_DELETEATTR
</tt> </td><td>Delete-attribute value
</td></tr>
309 <tr><td><tt>IPP_TAG_END
</tt> </td><td>End-of-attributes
</td></tr>
310 <tr><td><tt>IPP_TAG_END_COLLECTION
</tt> </td><td>End of collection value
</td></tr>
311 <tr><td><tt>IPP_TAG_ENUM
</tt> </td><td>Enumeration value
</td></tr>
312 <tr><td><tt>IPP_TAG_EVENT_NOTIFICATION
</tt> </td><td>Event group
</td></tr>
313 <tr><td><tt>IPP_TAG_INTEGER
</tt> </td><td>Integer value
</td></tr>
314 <tr><td><tt>IPP_TAG_JOB
</tt> </td><td>Job group
</td></tr>
315 <tr><td><tt>IPP_TAG_KEYWORD
</tt> </td><td>Keyword value
</td></tr>
316 <tr><td><tt>IPP_TAG_LANGUAGE
</tt> </td><td>Language value
</td></tr>
317 <tr><td><tt>IPP_TAG_MASK
</tt> </td><td>Mask for copied attribute values
</td></tr>
318 <tr><td><tt>IPP_TAG_MEMBERNAME
</tt> </td><td>Collection member name value
</td></tr>
319 <tr><td><tt>IPP_TAG_MIMETYPE
</tt> </td><td>MIME media type value
</td></tr>
320 <tr><td><tt>IPP_TAG_NAME
</tt> </td><td>Name value
</td></tr>
321 <tr><td><tt>IPP_TAG_NAMELANG
</tt> </td><td>Name-with-language value
</td></tr>
322 <tr><td><tt>IPP_TAG_NOTSETTABLE
</tt> </td><td>Not-settable value
</td></tr>
323 <tr><td><tt>IPP_TAG_NOVALUE
</tt> </td><td>No-value value
</td></tr>
324 <tr><td><tt>IPP_TAG_OPERATION
</tt> </td><td>Operation group
</td></tr>
325 <tr><td><tt>IPP_TAG_PRINTER
</tt> </td><td>Printer group
</td></tr>
326 <tr><td><tt>IPP_TAG_RANGE
</tt> </td><td>Range value
</td></tr>
327 <tr><td><tt>IPP_TAG_RESOLUTION
</tt> </td><td>Resolution value
</td></tr>
328 <tr><td><tt>IPP_TAG_STRING
</tt> </td><td>Octet string value
</td></tr>
329 <tr><td><tt>IPP_TAG_SUBSCRIPTION
</tt> </td><td>Subscription group
</td></tr>
330 <tr><td><tt>IPP_TAG_TEXT
</tt> </td><td>Text value
</td></tr>
331 <tr><td><tt>IPP_TAG_TEXTLANG
</tt> </td><td>Text-with-language value
</td></tr>
332 <tr><td><tt>IPP_TAG_UNKNOWN
</tt> </td><td>Unknown value
</td></tr>
333 <tr><td><tt>IPP_TAG_UNSUPPORTED_GROUP
</tt> </td><td>Unsupported attributes group
</td></tr>
334 <tr><td><tt>IPP_TAG_UNSUPPORTED_VALUE
</tt> </td><td>Unsupported value
</td></tr>
335 <tr><td><tt>IPP_TAG_URI
</tt> </td><td>URI value
</td></tr>
336 <tr><td><tt>IPP_TAG_URISCHEME
</tt> </td><td>URI scheme value
</td></tr>
337 <tr><td><tt>IPP_TAG_ZERO
</tt> </td><td>Zero tag - used for separators
</td></tr>
338 </tbody></table></div>
340 <h2 class='title'
><a name='FUNCTIONS'
>Functions
</a></h2>
342 <li><a href='#cupsDoAuthentication'
><tt>cupsDoAuthentication()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
343 <li><a href='#cupsDoFileRequest'
><tt>cupsDoFileRequest()
</tt></a> </li>
344 <li><a href='#cupsDoRequest'
><tt>cupsDoRequest()
</tt></a> </li>
345 <li><a href='#cupsEncodeOptions'
><tt>cupsEncodeOptions()
</tt></a> </li>
346 <li><a href='#cupsEncodeOptions2'
><tt>cupsEncodeOptions2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
347 <li><a href='#httpAddrAny'
><tt>httpAddrAny()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
348 <li><a href='#httpAddrEqual'
><tt>httpAddrEqual()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
349 <li><a href='#httpAddrLength'
><tt>httpAddrLength()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
350 <li><a href='#httpAddrLocalhost'
><tt>httpAddrLocalhost()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
351 <li><a href='#httpAddrLookup'
><tt>httpAddrLookup()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
352 <li><a href='#httpAddrString'
><tt>httpAddrString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
353 <li><a href='#httpAssembleURI'
><tt>httpAssembleURI()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
354 <li><a href='#httpAssembleURIf'
><tt>httpAssembleURIf()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
355 <li><a href='#httpBlocking'
><tt>httpBlocking()
</tt></a> </li>
356 <li><a href='#httpCheck'
><tt>httpCheck()
</tt></a> </li>
357 <li><a href='#httpClearCookie'
><tt>httpClearCookie()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
358 <li><a href='#httpClearFields'
><tt>httpClearFields()
</tt></a> </li>
359 <li><a href='#httpClose'
><tt>httpClose()
</tt></a> </li>
360 <li><a href='#httpConnect'
><tt>httpConnect()
</tt></a> </li>
361 <li><a href='#httpConnectEncrypt'
><tt>httpConnectEncrypt()
</tt></a> </li>
362 <li><a href='#httpDecode64'
><tt>httpDecode64()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
363 <li><a href='#httpDecode64_2'
><tt>httpDecode64_2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
364 <li><a href='#httpDelete'
><tt>httpDelete()
</tt></a> </li>
365 <li><a href='#httpEncode64'
><tt>httpEncode64()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
366 <li><a href='#httpEncode64_2'
><tt>httpEncode64_2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
367 <li><a href='#httpEncryption'
><tt>httpEncryption()
</tt></a> </li>
368 <li><a href='#httpError'
><tt>httpError()
</tt></a> </li>
369 <li><a href='#httpFlush'
><tt>httpFlush()
</tt></a> </li>
370 <li><a href='#httpFlushWrite'
><tt>httpFlushWrite()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
371 <li><a href='#httpGet'
><tt>httpGet()
</tt></a> </li>
372 <li><a href='#httpGetBlocking'
><tt>httpGetBlocking()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
373 <li><a href='#httpGetCookie'
><tt>httpGetCookie()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
374 <li><a href='#httpGetDateString'
><tt>httpGetDateString()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
375 <li><a href='#httpGetDateString2'
><tt>httpGetDateString2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
376 <li><a href='#httpGetDateTime'
><tt>httpGetDateTime()
</tt></a> </li>
377 <li><a href='#httpGetFd'
><tt>httpGetFd()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
378 <li><a href='#httpGetField'
><tt>httpGetField()
</tt></a> </li>
379 <li><a href='#httpGetHostByName'
><tt>httpGetHostByName()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
380 <li><a href='#httpGetHostname'
><tt>httpGetHostname()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
381 <li><a href='#httpGetLength'
><tt>httpGetLength()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
382 <li><a href='#httpGetLength2'
><tt>httpGetLength2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
383 <li><a href='#httpGetStatus'
><tt>httpGetStatus()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
384 <li><a href='#httpGetSubField'
><tt>httpGetSubField()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
385 <li><a href='#httpGetSubField2'
><tt>httpGetSubField2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
386 <li><a href='#httpGets'
><tt>httpGets()
</tt></a> </li>
387 <li><a href='#httpHead'
><tt>httpHead()
</tt></a> </li>
388 <li><a href='#httpInitialize'
><tt>httpInitialize()
</tt></a> </li>
389 <li><a href='#httpMD5'
><tt>httpMD5()
</tt></a> </li>
390 <li><a href='#httpMD5Final'
><tt>httpMD5Final()
</tt></a> </li>
391 <li><a href='#httpMD5String'
><tt>httpMD5String()
</tt></a> </li>
392 <li><a href='#httpOptions'
><tt>httpOptions()
</tt></a> </li>
393 <li><a href='#httpPost'
><tt>httpPost()
</tt></a> </li>
394 <li><a href='#httpPut'
><tt>httpPut()
</tt></a> </li>
395 <li><a href='#httpRead'
><tt>httpRead()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
396 <li><a href='#httpRead2'
><tt>httpRead2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
397 <li><a href='#httpReconnect'
><tt>httpReconnect()
</tt></a> </li>
398 <li><a href='#httpSeparate'
><tt>httpSeparate()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
399 <li><a href='#httpSeparate2'
><tt>httpSeparate2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
400 <li><a href='#httpSeparateURI'
><tt>httpSeparateURI()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
401 <li><a href='#httpSetCookie'
><tt>httpSetCookie()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
402 <li><a href='#httpSetExpect'
><tt>httpSetExpect()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
403 <li><a href='#httpSetField'
><tt>httpSetField()
</tt></a> </li>
404 <li><a href='#httpSetLength'
><tt>httpSetLength()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
405 <li><a href='#httpStatus'
><tt>httpStatus()
</tt></a> </li>
406 <li><a href='#httpTrace'
><tt>httpTrace()
</tt></a> </li>
407 <li><a href='#httpUpdate'
><tt>httpUpdate()
</tt></a> </li>
408 <li><a href='#httpWait'
><tt>httpWait()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
409 <li><a href='#httpWrite'
><tt>httpWrite()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
410 <li><a href='#httpWrite2'
><tt>httpWrite2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
411 <li><a href='#ippAddBoolean'
><tt>ippAddBoolean()
</tt></a> </li>
412 <li><a href='#ippAddBooleans'
><tt>ippAddBooleans()
</tt></a> </li>
413 <li><a href='#ippAddCollection'
><tt>ippAddCollection()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
414 <li><a href='#ippAddCollections'
><tt>ippAddCollections()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
415 <li><a href='#ippAddDate'
><tt>ippAddDate()
</tt></a> </li>
416 <li><a href='#ippAddInteger'
><tt>ippAddInteger()
</tt></a> </li>
417 <li><a href='#ippAddIntegers'
><tt>ippAddIntegers()
</tt></a> </li>
418 <li><a href='#ippAddOctetString'
><tt>ippAddOctetString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
419 <li><a href='#ippAddRange'
><tt>ippAddRange()
</tt></a> </li>
420 <li><a href='#ippAddRanges'
><tt>ippAddRanges()
</tt></a> </li>
421 <li><a href='#ippAddResolution'
><tt>ippAddResolution()
</tt></a> </li>
422 <li><a href='#ippAddResolutions'
><tt>ippAddResolutions()
</tt></a> </li>
423 <li><a href='#ippAddSeparator'
><tt>ippAddSeparator()
</tt></a> </li>
424 <li><a href='#ippAddString'
><tt>ippAddString()
</tt></a> </li>
425 <li><a href='#ippAddStrings'
><tt>ippAddStrings()
</tt></a> </li>
426 <li><a href='#ippDateToTime'
><tt>ippDateToTime()
</tt></a> </li>
427 <li><a href='#ippDelete'
><tt>ippDelete()
</tt></a> </li>
428 <li><a href='#ippDeleteAttribute'
><tt>ippDeleteAttribute()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
429 <li><a href='#ippErrorString'
><tt>ippErrorString()
</tt></a> </li>
430 <li><a href='#ippErrorValue'
><tt>ippErrorValue()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
431 <li><a href='#ippFindAttribute'
><tt>ippFindAttribute()
</tt></a> </li>
432 <li><a href='#ippFindNextAttribute'
><tt>ippFindNextAttribute()
</tt></a> </li>
433 <li><a href='#ippLength'
><tt>ippLength()
</tt></a> </li>
434 <li><a href='#ippNew'
><tt>ippNew()
</tt></a> </li>
435 <li><a href='#ippNewRequest'
><tt>ippNewRequest()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
436 <li><a href='#ippOpString'
><tt>ippOpString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
437 <li><a href='#ippOpValue'
><tt>ippOpValue()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
438 <li><a href='#ippPort'
><tt>ippPort()
</tt></a> </li>
439 <li><a href='#ippRead'
><tt>ippRead()
</tt></a> </li>
440 <li><a href='#ippReadFile'
><tt>ippReadFile()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
441 <li><a href='#ippReadIO'
><tt>ippReadIO()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
442 <li><a href='#ippSetPort'
><tt>ippSetPort()
</tt></a> </li>
443 <li><a href='#ippTimeToDate'
><tt>ippTimeToDate()
</tt></a> </li>
444 <li><a href='#ippWrite'
><tt>ippWrite()
</tt></a> </li>
445 <li><a href='#ippWriteFile'
><tt>ippWriteFile()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
446 <li><a href='#ippWriteIO'
><tt>ippWriteIO()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
449 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsDoAuthentication'
>cupsDoAuthentication()
</a></h3>
451 <p>Authenticate a request.
453 This function should be called in response to a HTTP_UNAUTHORIZED
454 status, prior to resubmitting your request.
460 cupsDoAuthentication(
461 <a href='#http_t'
>http_t
</a> * http,
463 const char * resource);
466 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
467 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
469 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
470 <tr><td><tt>method
</tt></td><td>Request method (GET, POST, PUT)
</td></tr>
471 <tr><td><tt>resource
</tt></td><td>Resource path
</td></tr>
472 </tbody></table></div>
474 <p>0 on success, -
1 on error
</p>
476 <h3 class='title'
><a name='cupsDoFileRequest'
>cupsDoFileRequest()
</a></h3>
478 <p>Do an IPP request with a file.
480 This function sends the IPP request to the specified server, retrying
481 and authenticating as necessary. The request is freed with ippDelete()
482 after receiving a valid IPP response.
</p>
485 <a href='#ipp_t'
>ipp_t
</a> *
487 <a href='#http_t'
>http_t
</a> * http,
488 <a href='#ipp_t'
>ipp_t
</a> * request,
489 const char * resource,
490 const char * filename);
493 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
494 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
496 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
497 <tr><td><tt>request
</tt></td><td>IPP request
</td></tr>
498 <tr><td><tt>resource
</tt></td><td>HTTP resource for POST
</td></tr>
499 <tr><td><tt>filename
</tt></td><td>File to send or NULL for none
</td></tr>
500 </tbody></table></div>
504 <h3 class='title'
><a name='cupsDoRequest'
>cupsDoRequest()
</a></h3>
506 <p>Do an IPP request.
508 This function sends the IPP request to the specified server, retrying
509 and authenticating as necessary. The request is freed with ippDelete()
510 after receiving a valid IPP response.
</p>
513 <a href='#ipp_t'
>ipp_t
</a> *
515 <a href='#http_t'
>http_t
</a> * http,
516 <a href='#ipp_t'
>ipp_t
</a> * request,
517 const char * resource);
520 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
521 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
523 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
524 <tr><td><tt>request
</tt></td><td>IPP request
</td></tr>
525 <tr><td><tt>resource
</tt></td><td>HTTP resource for POST
</td></tr>
526 </tbody></table></div>
530 <h3 class='title'
><a name='cupsEncodeOptions'
>cupsEncodeOptions()
</a></h3>
532 <p>Encode printer options into IPP attributes.
534 This function adds operation, job, and then subscription attributes,
535 in that order. Use the cupsEncodeOptions2() function to add attributes
536 for a single group.
</p>
541 <a href='#ipp_t'
>ipp_t
</a> * ipp,
543 cups_option_t * options);
546 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
547 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
549 <tr><td><tt>ipp
</tt></td><td>Request to add to
</td></tr>
550 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
551 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
552 </tbody></table></div>
556 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='cupsEncodeOptions2'
>cupsEncodeOptions2()
</a></h3>
558 <p>Encode printer options into IPP attributes for a group.
560 This function only adds attributes for a single group. Call this
561 function multiple times for each group, or use cupsEncodeOptions()
562 to add the standard groups.
569 <a href='#ipp_t'
>ipp_t
</a> * ipp,
571 cups_option_t * options,
572 ipp_tag_t group_tag);
575 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
576 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
578 <tr><td><tt>ipp
</tt></td><td>Request to add to
</td></tr>
579 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
580 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
581 <tr><td><tt>group_tag
</tt></td><td>Group to encode
</td></tr>
582 </tbody></table></div>
586 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrAny'
>httpAddrAny()
</a></h3>
588 <p>Check for the
"any
" address.
595 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
598 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
599 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
601 <tr><td><tt>addr
</tt></td><td>Address to check
</td></tr>
602 </tbody></table></div>
604 <p>1 if
"any
",
0 otherwise
</p>
606 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrEqual'
>httpAddrEqual()
</a></h3>
608 <p>Compare two addresses.
615 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr1,
616 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr2);
619 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
620 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
622 <tr><td><tt>addr1
</tt></td><td>First address
</td></tr>
623 <tr><td><tt>addr2
</tt></td><td>Second address
</td></tr>
624 </tbody></table></div>
626 <p>1 if equal,
0 if not
</p>
628 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLength'
>httpAddrLength()
</a></h3>
630 <p>Return the length of the address in bytes.
637 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
640 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
641 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
643 <tr><td><tt>addr
</tt></td><td>Address
</td></tr>
644 </tbody></table></div>
646 <p>Length in bytes
</p>
648 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLocalhost'
>httpAddrLocalhost()
</a></h3>
650 <p>Check for the local loopback address.
657 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
660 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
661 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
663 <tr><td><tt>addr
</tt></td><td>Address to check
</td></tr>
664 </tbody></table></div>
666 <p>1 if local host,
0 otherwise
</p>
668 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLookup'
>httpAddrLookup()
</a></h3>
670 <p>Lookup the hostname associated with the address.
677 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr,
682 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
683 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
685 <tr><td><tt>addr
</tt></td><td>Address to lookup
</td></tr>
686 <tr><td><tt>name
</tt></td><td>Host name buffer
</td></tr>
687 <tr><td><tt>namelen
</tt></td><td>Size of name buffer
</td></tr>
688 </tbody></table></div>
692 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrString'
>httpAddrString()
</a></h3>
694 <p>Convert an address to a numeric string.
701 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr,
706 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
707 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
709 <tr><td><tt>addr
</tt></td><td>Address to convert
</td></tr>
710 <tr><td><tt>s
</tt></td><td>String buffer
</td></tr>
711 <tr><td><tt>slen
</tt></td><td>Length of string
</td></tr>
712 </tbody></table></div>
714 <p>Numeric address string
</p>
716 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAssembleURI'
>httpAssembleURI()
</a></h3>
718 <p>Assemble a uniform resource identifier from its
721 This function escapes reserved characters in the URI depending on the
722 value of the
"encoding
" argument. You should use this function in
723 place of traditional string functions whenever you need to create a
731 http_uri_coding_t encoding,
735 const char * username,
738 const char * resource);
741 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
742 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
744 <tr><td><tt>encoding
</tt></td><td>Encoding flags
</td></tr>
745 <tr><td><tt>uri
</tt></td><td>URI buffer
</td></tr>
746 <tr><td><tt>urilen
</tt></td><td>Size of URI buffer
</td></tr>
747 <tr><td><tt>scheme
</tt></td><td>Scheme name
</td></tr>
748 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
749 <tr><td><tt>host
</tt></td><td>Hostname or address
</td></tr>
750 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
751 <tr><td><tt>resource
</tt></td><td>Resource
</td></tr>
752 </tbody></table></div>
756 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAssembleURIf'
>httpAssembleURIf()
</a></h3>
758 <p>Assemble a uniform resource identifier from its
759 components with a formatted resource.
761 This function creates a formatted version of the resource string
762 argument
"resourcef
" and escapes reserved characters in the URI
763 depending on the value of the
"encoding
" argument. You should use
764 this function in place of traditional string functions whenever
765 you need to create a URI string.
772 http_uri_coding_t encoding,
776 const char * username,
779 const char * resourcef,
783 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
784 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
786 <tr><td><tt>encoding
</tt></td><td>Encoding flags
</td></tr>
787 <tr><td><tt>uri
</tt></td><td>URI buffer
</td></tr>
788 <tr><td><tt>urilen
</tt></td><td>Size of URI buffer
</td></tr>
789 <tr><td><tt>scheme
</tt></td><td>Scheme name
</td></tr>
790 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
791 <tr><td><tt>host
</tt></td><td>Hostname or address
</td></tr>
792 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
793 <tr><td><tt>resourcef
</tt></td><td>Printf-style resource
</td></tr>
794 <tr><td><tt>...
</tt></td><td>Additional arguments as needed
</td></tr>
795 </tbody></table></div>
799 <h3 class='title'
><a name='httpBlocking'
>httpBlocking()
</a></h3>
801 <p>Set blocking/non-blocking behavior on a connection.
</p>
806 <a href='#http_t'
>http_t
</a> * http,
810 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
811 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
813 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
814 <tr><td><tt>b
</tt></td><td>1 = blocking,
0 = non-blocking
</td></tr>
815 </tbody></table></div>
819 <h3 class='title'
><a name='httpCheck'
>httpCheck()
</a></h3>
821 <p>Check to see if there is a pending response from the server.
</p>
826 <a href='#http_t'
>http_t
</a> * http);
829 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
830 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
832 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
833 </tbody></table></div>
835 <p>0 = no data,
1 = data available
</p>
837 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpClearCookie'
>httpClearCookie()
</a></h3>
839 <p>Clear the cookie value(s).
846 <a href='#http_t'
>http_t
</a> * http);
849 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
850 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
852 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
853 </tbody></table></div>
857 <h3 class='title'
><a name='httpClearFields'
>httpClearFields()
</a></h3>
859 <p>Clear HTTP request fields.
</p>
864 <a href='#http_t'
>http_t
</a> * http);
867 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
868 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
870 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
871 </tbody></table></div>
875 <h3 class='title'
><a name='httpClose'
>httpClose()
</a></h3>
877 <p>Close an HTTP connection...
</p>
882 <a href='#http_t'
>http_t
</a> * http);
885 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
886 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
888 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
889 </tbody></table></div>
893 <h3 class='title'
><a name='httpConnect'
>httpConnect()
</a></h3>
895 <p>Connect to a HTTP server.
</p>
898 <a href='#http_t'
>http_t
</a> *
904 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
905 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
907 <tr><td><tt>host
</tt></td><td>Host to connect to
</td></tr>
908 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
909 </tbody></table></div>
911 <p>New HTTP connection
</p>
913 <h3 class='title'
><a name='httpConnectEncrypt'
>httpConnectEncrypt()
</a></h3>
915 <p>Connect to a HTTP server using encryption.
</p>
918 <a href='#http_t'
>http_t
</a> *
922 <a href='#http_encryption_t'
>http_encryption_t
</a> encryption);
925 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
926 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
928 <tr><td><tt>host
</tt></td><td>Host to connect to
</td></tr>
929 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
930 <tr><td><tt>encryption
</tt></td><td>Type of encryption to use
</td></tr>
931 </tbody></table></div>
933 <p>New HTTP connection
</p>
935 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpDecode64'
>httpDecode64()
</a></h3>
937 <p>Base64-decode a string.
939 This function is deprecated. Use the httpDecode64_2() function instead
940 which provides buffer length arguments.
951 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
952 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
954 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
955 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
956 </tbody></table></div>
958 <p>Decoded string
</p>
960 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpDecode64_2'
>httpDecode64_2()
</a></h3>
962 <p>Base64-decode a string.
974 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
975 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
977 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
978 <tr><td><tt>outlen
</tt></td><td>Size of output string
</td></tr>
979 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
980 </tbody></table></div>
982 <p>Decoded string
</p>
984 <h3 class='title'
><a name='httpDelete'
>httpDelete()
</a></h3>
986 <p>Send a DELETE request to the server.
</p>
991 <a href='#http_t'
>http_t
</a> * http,
995 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
996 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
998 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
999 <tr><td><tt>uri
</tt></td><td>URI to delete
</td></tr>
1000 </tbody></table></div>
1002 <p>Status of call (
0 = success)
</p>
1004 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpEncode64'
>httpEncode64()
</a></h3>
1005 <h4>Description
</h4>
1006 <p>Base64-encode a string.
1008 This function is deprecated. Use the httpEncode64_2() function instead
1009 which provides buffer length arguments.
1020 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1021 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1023 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
1024 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
1025 </tbody></table></div>
1027 <p>Encoded string
</p>
1029 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpEncode64_2'
>httpEncode64_2()
</a></h3>
1030 <h4>Description
</h4>
1031 <p>Base64-encode a string.
1044 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1045 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1047 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
1048 <tr><td><tt>outlen
</tt></td><td>Size of output string
</td></tr>
1049 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
1050 <tr><td><tt>inlen
</tt></td><td>Size of input string
</td></tr>
1051 </tbody></table></div>
1053 <p>Encoded string
</p>
1055 <h3 class='title'
><a name='httpEncryption'
>httpEncryption()
</a></h3>
1056 <h4>Description
</h4>
1057 <p>Set the required encryption on the link.
</p>
1062 <a href='#http_t'
>http_t
</a> * http,
1063 <a href='#http_encryption_t'
>http_encryption_t
</a> e);
1066 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1067 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1069 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1070 <tr><td><tt>e
</tt></td><td>New encryption preference
</td></tr>
1071 </tbody></table></div>
1073 <p>-
1 on error,
0 on success
</p>
1075 <h3 class='title'
><a name='httpError'
>httpError()
</a></h3>
1076 <h4>Description
</h4>
1077 <p>Get the last error on a connection.
</p>
1082 <a href='#http_t'
>http_t
</a> * http);
1085 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1086 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1088 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1089 </tbody></table></div>
1091 <p>Error code (errno) value
</p>
1093 <h3 class='title'
><a name='httpFlush'
>httpFlush()
</a></h3>
1094 <h4>Description
</h4>
1095 <p>Flush data from a HTTP connection.
</p>
1100 <a href='#http_t'
>http_t
</a> * http);
1103 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1104 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1106 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1107 </tbody></table></div>
1111 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpFlushWrite'
>httpFlushWrite()
</a></h3>
1112 <h4>Description
</h4>
1113 <p>Flush data in write buffer.
1120 <a href='#http_t'
>http_t
</a> * http);
1123 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1124 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1126 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1127 </tbody></table></div>
1129 <p>Bytes written or -
1 on error
</p>
1131 <h3 class='title'
><a name='httpGet'
>httpGet()
</a></h3>
1132 <h4>Description
</h4>
1133 <p>Send a GET request to the server.
</p>
1138 <a href='#http_t'
>http_t
</a> * http,
1142 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1143 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1145 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1146 <tr><td><tt>uri
</tt></td><td>URI to get
</td></tr>
1147 </tbody></table></div>
1149 <p>Status of call (
0 = success)
</p>
1151 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetBlocking'
>httpGetBlocking()
</a></h3>
1152 <h4>Description
</h4>
1153 <p>Get the blocking/non-block state of a connection.
1160 <a href='#http_t'
>http_t
</a> * http);
1163 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1164 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1166 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1167 </tbody></table></div>
1169 <p>1 if blocking,
0 if non-blocking
</p>
1171 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpGetCookie'
>httpGetCookie()
</a></h3>
1172 <h4>Description
</h4>
1173 <p>Get any cookie data from the response.
1180 <a href='#http_t'
>http_t
</a> * http);
1183 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1184 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1186 <tr><td><tt>http
</tt></td><td>HTTP connecion
</td></tr>
1187 </tbody></table></div>
1189 <p>Cookie data or NULL
</p>
1191 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetDateString'
>httpGetDateString()
</a></h3>
1192 <h4>Description
</h4>
1193 <p>Get a formatted date/time string from a time value.
1203 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1204 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1206 <tr><td><tt>t
</tt></td><td>UNIX time
</td></tr>
1207 </tbody></table></div>
1209 <p>Date/time string
</p>
1211 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetDateString2'
>httpGetDateString2()
</a></h3>
1212 <h4>Description
</h4>
1213 <p>Get a formatted date/time string from a time value.
1225 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1226 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1228 <tr><td><tt>t
</tt></td><td>UNIX time
</td></tr>
1229 <tr><td><tt>s
</tt></td><td>String buffer
</td></tr>
1230 <tr><td><tt>slen
</tt></td><td>Size of string buffer
</td></tr>
1231 </tbody></table></div>
1233 <p>Date/time string
</p>
1235 <h3 class='title'
><a name='httpGetDateTime'
>httpGetDateTime()
</a></h3>
1236 <h4>Description
</h4>
1237 <p>Get a time value from a formatted date/time string.
</p>
1245 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1246 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1248 <tr><td><tt>s
</tt></td><td>Date/time string
</td></tr>
1249 </tbody></table></div>
1253 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetFd'
>httpGetFd()
</a></h3>
1254 <h4>Description
</h4>
1255 <p>Get the file descriptor associated with a connection.
1262 <a href='#http_t'
>http_t
</a> * http);
1265 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1266 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1268 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1269 </tbody></table></div>
1271 <p>File descriptor or -
1 if none
</p>
1273 <h3 class='title'
><a name='httpGetField'
>httpGetField()
</a></h3>
1274 <h4>Description
</h4>
1275 <p>Get a field value from a request/response.
</p>
1280 <a href='#http_t'
>http_t
</a> * http,
1281 http_field_t field);
1284 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1285 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1287 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1288 <tr><td><tt>field
</tt></td><td>Field to get
</td></tr>
1289 </tbody></table></div>
1293 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetHostByName'
>httpGetHostByName()
</a></h3>
1294 <h4>Description
</h4>
1295 <p>Lookup a hostname or IPv4 address, and return
1296 address records for the specified name.
1306 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1307 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1309 <tr><td><tt>name
</tt></td><td>Hostname or IP address
</td></tr>
1310 </tbody></table></div>
1314 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetHostname'
>httpGetHostname()
</a></h3>
1315 <h4>Description
</h4>
1316 <p>Get the FQDN for the connection or local system.
1318 When
"http
" points to a connected socket, return the hostname or
1319 address that was used in the call to httpConnect() or httpConnectEncrypt().
1320 Otherwise, return the FQDN for the local system using both gethostname()
1321 and gethostbyname() to get the local hostname with domain.
1328 <a href='#http_t'
>http_t
</a> * http,
1333 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1334 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1336 <tr><td><tt>http
</tt></td><td>HTTP connection or NULL
</td></tr>
1337 <tr><td><tt>s
</tt></td><td>String buffer for name
</td></tr>
1338 <tr><td><tt>slen
</tt></td><td>Size of buffer
</td></tr>
1339 </tbody></table></div>
1341 <p>FQDN for connection or system
</p>
1343 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetLength'
>httpGetLength()
</a></h3>
1344 <h4>Description
</h4>
1345 <p>Get the amount of data remaining from the
1346 content-length or transfer-encoding fields.
1348 This function is deprecated and will not return lengths larger than
1349 2^
31 -
1; use httpGetLength2() instead.
1356 <a href='#http_t'
>http_t
</a> * http);
1359 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1360 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1362 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1363 </tbody></table></div>
1365 <p>Content length
</p>
1367 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetLength2'
>httpGetLength2()
</a></h3>
1368 <h4>Description
</h4>
1369 <p>Get the amount of data remaining from the
1370 content-length or transfer-encoding fields.
1372 This function returns the complete content length, even for
1373 content larger than
2^
31 -
1.
1380 <a href='#http_t'
>http_t
</a> * http);
1383 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1384 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1386 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1387 </tbody></table></div>
1389 <p>Content length
</p>
1391 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetStatus'
>httpGetStatus()
</a></h3>
1392 <h4>Description
</h4>
1393 <p>Get the status of the last HTTP request.
1400 <a href='#http_t'
>http_t
</a> * http);
1403 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1404 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1406 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1407 </tbody></table></div>
1411 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetSubField'
>httpGetSubField()
</a></h3>
1412 <h4>Description
</h4>
1413 <p>Get a sub-field value.
1420 <a href='#http_t'
>http_t
</a> * http,
1426 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1427 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1429 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1430 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
1431 <tr><td><tt>name
</tt></td><td>Name of sub-field
</td></tr>
1432 <tr><td><tt>value
</tt></td><td>Value string
</td></tr>
1433 </tbody></table></div>
1435 <p>Value or NULL
</p>
1437 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetSubField2'
>httpGetSubField2()
</a></h3>
1438 <h4>Description
</h4>
1439 <p>Get a sub-field value.
1446 <a href='#http_t'
>http_t
</a> * http,
1453 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1454 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1456 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1457 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
1458 <tr><td><tt>name
</tt></td><td>Name of sub-field
</td></tr>
1459 <tr><td><tt>value
</tt></td><td>Value string
</td></tr>
1460 <tr><td><tt>valuelen
</tt></td><td>Size of value buffer
</td></tr>
1461 </tbody></table></div>
1463 <p>Value or NULL
</p>
1465 <h3 class='title'
><a name='httpGets'
>httpGets()
</a></h3>
1466 <h4>Description
</h4>
1467 <p>Get a line of text from a HTTP connection.
</p>
1474 <a href='#http_t'
>http_t
</a> * http);
1477 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1478 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1480 <tr><td><tt>line
</tt></td><td>Line to read into
</td></tr>
1481 <tr><td><tt>length
</tt></td><td>Max length of buffer
</td></tr>
1482 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1483 </tbody></table></div>
1487 <h3 class='title'
><a name='httpHead'
>httpHead()
</a></h3>
1488 <h4>Description
</h4>
1489 <p>Send a HEAD request to the server.
</p>
1494 <a href='#http_t'
>http_t
</a> * http,
1498 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1499 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1501 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1502 <tr><td><tt>uri
</tt></td><td>URI for head
</td></tr>
1503 </tbody></table></div>
1505 <p>Status of call (
0 = success)
</p>
1507 <h3 class='title'
><a name='httpInitialize'
>httpInitialize()
</a></h3>
1508 <h4>Description
</h4>
1509 <p>Initialize the HTTP interface library and set the
1510 default HTTP proxy (if any).
</p>
1514 httpInitialize(void);
1521 <h3 class='title'
><a name='httpMD5'
>httpMD5()
</a></h3>
1522 <h4>Description
</h4>
1523 <p>Compute the MD5 sum of the username:group:password.
</p>
1528 const char * username,
1530 const char * passwd,
1534 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1535 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1537 <tr><td><tt>username
</tt></td><td>User name
</td></tr>
1538 <tr><td><tt>realm
</tt></td><td>Realm name
</td></tr>
1539 <tr><td><tt>passwd
</tt></td><td>Password string
</td></tr>
1540 <tr><td><tt>md5[
33]
</tt></td><td>MD5 string
</td></tr>
1541 </tbody></table></div>
1545 <h3 class='title'
><a name='httpMD5Final'
>httpMD5Final()
</a></h3>
1546 <h4>Description
</h4>
1547 <p>Combine the MD5 sum of the username, group, and password
1548 with the server-supplied nonce value, method, and
1555 const char * method,
1556 const char * resource,
1560 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1561 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1563 <tr><td><tt>nonce
</tt></td><td>Server nonce value
</td></tr>
1564 <tr><td><tt>method
</tt></td><td>METHOD (GET, POST, etc.)
</td></tr>
1565 <tr><td><tt>resource
</tt></td><td>Resource path
</td></tr>
1566 <tr><td><tt>md5[
33]
</tt></td><td>MD5 sum
</td></tr>
1567 </tbody></table></div>
1571 <h3 class='title'
><a name='httpMD5String'
>httpMD5String()
</a></h3>
1572 <h4>Description
</h4>
1573 <p>Convert an MD5 sum to a character string.
</p>
1578 const unsigned char * sum,
1582 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1583 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1585 <tr><td><tt>sum
</tt></td><td>MD5 sum data
</td></tr>
1586 <tr><td><tt>md5[
33]
</tt></td><td>MD5 sum in hex
</td></tr>
1587 </tbody></table></div>
1589 <p>MD5 sum in hex
</p>
1591 <h3 class='title'
><a name='httpOptions'
>httpOptions()
</a></h3>
1592 <h4>Description
</h4>
1593 <p>Send an OPTIONS request to the server.
</p>
1598 <a href='#http_t'
>http_t
</a> * http,
1602 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1603 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1605 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1606 <tr><td><tt>uri
</tt></td><td>URI for options
</td></tr>
1607 </tbody></table></div>
1609 <p>Status of call (
0 = success)
</p>
1611 <h3 class='title'
><a name='httpPost'
>httpPost()
</a></h3>
1612 <h4>Description
</h4>
1613 <p>Send a POST request to the server.
</p>
1618 <a href='#http_t'
>http_t
</a> * http,
1622 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1623 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1625 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1626 <tr><td><tt>uri
</tt></td><td>URI for post
</td></tr>
1627 </tbody></table></div>
1629 <p>Status of call (
0 = success)
</p>
1631 <h3 class='title'
><a name='httpPut'
>httpPut()
</a></h3>
1632 <h4>Description
</h4>
1633 <p>Send a PUT request to the server.
</p>
1638 <a href='#http_t'
>http_t
</a> * http,
1642 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1643 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1645 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1646 <tr><td><tt>uri
</tt></td><td>URI to put
</td></tr>
1647 </tbody></table></div>
1649 <p>Status of call (
0 = success)
</p>
1651 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpRead'
>httpRead()
</a></h3>
1652 <h4>Description
</h4>
1653 <p>Read data from a HTTP connection.
1655 This function is deprecated. Use the httpRead2() function which can
1656 read more than
2GB of data.
1663 <a href='#http_t'
>http_t
</a> * http,
1668 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1669 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1671 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1672 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
1673 <tr><td><tt>length
</tt></td><td>Maximum number of bytes
</td></tr>
1674 </tbody></table></div>
1676 <p>Number of bytes read
</p>
1678 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpRead2'
>httpRead2()
</a></h3>
1679 <h4>Description
</h4>
1680 <p>Read data from a HTTP connection.
1687 <a href='#http_t'
>http_t
</a> * http,
1692 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1693 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1695 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1696 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
1697 <tr><td><tt>length
</tt></td><td>Maximum number of bytes
</td></tr>
1698 </tbody></table></div>
1700 <p>Number of bytes read
</p>
1702 <h3 class='title'
><a name='httpReconnect'
>httpReconnect()
</a></h3>
1703 <h4>Description
</h4>
1704 <p>Reconnect to a HTTP server.
</p>
1709 <a href='#http_t'
>http_t
</a> * http);
1712 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1713 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1715 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1716 </tbody></table></div>
1718 <p>0 on success, non-zero on failure
</p>
1720 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpSeparate'
>httpSeparate()
</a></h3>
1721 <h4>Description
</h4>
1722 <p>Separate a Universal Resource Identifier into its
1725 This function is deprecated; use the httpSeparateURI() function instead.
1740 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1741 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1743 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
1744 <tr><td><tt>scheme
</tt></td><td>Scheme [
32] (http, https, etc.)
</td></tr>
1745 <tr><td><tt>username
</tt></td><td>Username [
1024]
</td></tr>
1746 <tr><td><tt>host
</tt></td><td>Hostname [
1024]
</td></tr>
1747 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
1748 <tr><td><tt>resource
</tt></td><td>Resource/filename [
1024]
</td></tr>
1749 </tbody></table></div>
1753 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpSeparate2'
>httpSeparate2()
</a></h3>
1754 <h4>Description
</h4>
1755 <p>Separate a Universal Resource Identifier into its
1758 This function is deprecated; use the httpSeparateURI() function instead.
1778 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1779 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1781 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
1782 <tr><td><tt>scheme
</tt></td><td>Scheme (http, https, etc.)
</td></tr>
1783 <tr><td><tt>schemelen
</tt></td><td>Size of scheme buffer
</td></tr>
1784 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
1785 <tr><td><tt>usernamelen
</tt></td><td>Size of username buffer
</td></tr>
1786 <tr><td><tt>host
</tt></td><td>Hostname
</td></tr>
1787 <tr><td><tt>hostlen
</tt></td><td>Size of hostname buffer
</td></tr>
1788 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
1789 <tr><td><tt>resource
</tt></td><td>Resource/filename
</td></tr>
1790 <tr><td><tt>resourcelen
</tt></td><td>Size of resource buffer
</td></tr>
1791 </tbody></table></div>
1795 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpSeparateURI'
>httpSeparateURI()
</a></h3>
1796 <h4>Description
</h4>
1797 <p>Separate a Universal Resource Identifier into its
1805 http_uri_coding_t decoding,
1818 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1819 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1821 <tr><td><tt>decoding
</tt></td><td>Decoding flags
</td></tr>
1822 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
1823 <tr><td><tt>scheme
</tt></td><td>Scheme (http, https, etc.)
</td></tr>
1824 <tr><td><tt>schemelen
</tt></td><td>Size of scheme buffer
</td></tr>
1825 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
1826 <tr><td><tt>usernamelen
</tt></td><td>Size of username buffer
</td></tr>
1827 <tr><td><tt>host
</tt></td><td>Hostname
</td></tr>
1828 <tr><td><tt>hostlen
</tt></td><td>Size of hostname buffer
</td></tr>
1829 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
1830 <tr><td><tt>resource
</tt></td><td>Resource/filename
</td></tr>
1831 <tr><td><tt>resourcelen
</tt></td><td>Size of resource buffer
</td></tr>
1832 </tbody></table></div>
1834 <p>Result of separation
</p>
1836 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpSetCookie'
>httpSetCookie()
</a></h3>
1837 <h4>Description
</h4>
1838 <p>Set the cookie value(s)...
1845 <a href='#http_t'
>http_t
</a> * http,
1846 const char * cookie);
1849 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1850 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1852 <tr><td><tt>http
</tt></td><td>Connection
</td></tr>
1853 <tr><td><tt>cookie
</tt></td><td>Cookie string
</td></tr>
1854 </tbody></table></div>
1858 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpSetExpect'
>httpSetExpect()
</a></h3>
1859 <h4>Description
</h4>
1860 <p>Set the Expect: header in a request.
1862 Currently only HTTP_CONTINUE is supported for the
"expect
" argument.
1869 <a href='#http_t'
>http_t
</a> * http,
1870 http_status_t expect);
1873 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1874 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1876 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1877 <tr><td><tt>expect
</tt></td><td>HTTP status to expect (HTTP_CONTINUE)
</td></tr>
1878 </tbody></table></div>
1882 <h3 class='title'
><a name='httpSetField'
>httpSetField()
</a></h3>
1883 <h4>Description
</h4>
1884 <p>Set the value of an HTTP header.
</p>
1889 <a href='#http_t'
>http_t
</a> * http,
1891 const char * value);
1894 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1895 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1897 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1898 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
1899 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
1900 </tbody></table></div>
1904 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpSetLength'
>httpSetLength()
</a></h3>
1905 <h4>Description
</h4>
1906 <p>Set the content-length and content-encoding.
1913 <a href='#http_t'
>http_t
</a> * http,
1917 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1918 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1920 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1921 <tr><td><tt>length
</tt></td><td>Length (
0 for chunked)
</td></tr>
1922 </tbody></table></div>
1926 <h3 class='title'
><a name='httpStatus'
>httpStatus()
</a></h3>
1927 <h4>Description
</h4>
1928 <p>Return a short string describing a HTTP status code.
</p>
1933 http_status_t status);
1936 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1937 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1939 <tr><td><tt>status
</tt></td><td>HTTP status code
</td></tr>
1940 </tbody></table></div>
1942 <p>String or NULL
</p>
1944 <h3 class='title'
><a name='httpTrace'
>httpTrace()
</a></h3>
1945 <h4>Description
</h4>
1946 <p>Send an TRACE request to the server.
</p>
1951 <a href='#http_t'
>http_t
</a> * http,
1955 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1956 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1958 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1959 <tr><td><tt>uri
</tt></td><td>URI for trace
</td></tr>
1960 </tbody></table></div>
1962 <p>Status of call (
0 = success)
</p>
1964 <h3 class='title'
><a name='httpUpdate'
>httpUpdate()
</a></h3>
1965 <h4>Description
</h4>
1966 <p>Update the current HTTP state for incoming data.
</p>
1971 <a href='#http_t'
>http_t
</a> * http);
1974 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1975 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1977 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1978 </tbody></table></div>
1982 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpWait'
>httpWait()
</a></h3>
1983 <h4>Description
</h4>
1984 <p>Wait for data available on a connection.
1991 <a href='#http_t'
>http_t
</a> * http,
1995 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1996 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1998 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1999 <tr><td><tt>msec
</tt></td><td>Milliseconds to wait
</td></tr>
2000 </tbody></table></div>
2002 <p>1 if data is available,
0 otherwise
</p>
2004 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpWrite'
>httpWrite()
</a></h3>
2005 <h4>Description
</h4>
2006 <p>Write data to a HTTP connection.
2008 This function is deprecated. Use the httpWrite2() function which can
2009 write more than
2GB of data.
2016 <a href='#http_t'
>http_t
</a> * http,
2017 const char * buffer,
2021 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2022 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2024 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2025 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
2026 <tr><td><tt>length
</tt></td><td>Number of bytes to write
</td></tr>
2027 </tbody></table></div>
2029 <p>Number of bytes written
</p>
2031 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpWrite2'
>httpWrite2()
</a></h3>
2032 <h4>Description
</h4>
2033 <p>Write data to a HTTP connection.
2040 <a href='#http_t'
>http_t
</a> * http,
2041 const char * buffer,
2045 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2046 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2048 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2049 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
2050 <tr><td><tt>length
</tt></td><td>Number of bytes to write
</td></tr>
2051 </tbody></table></div>
2053 <p>Number of bytes written
</p>
2055 <h3 class='title'
><a name='ippAddBoolean'
>ippAddBoolean()
</a></h3>
2056 <h4>Description
</h4>
2057 <p>Add a boolean attribute to an IPP message.
</p>
2060 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2062 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2068 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2069 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2071 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2072 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2073 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2074 <tr><td><tt>value
</tt></td><td>Value of attribute
</td></tr>
2075 </tbody></table></div>
2077 <p>New attribute
</p>
2079 <h3 class='title'
><a name='ippAddBooleans'
>ippAddBooleans()
</a></h3>
2080 <h4>Description
</h4>
2081 <p>Add an array of boolean values.
</p>
2084 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2086 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2090 const char * values);
2093 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2094 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2096 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2097 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2098 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2099 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2100 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2101 </tbody></table></div>
2103 <p>New attribute
</p>
2105 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippAddCollection'
>ippAddCollection()
</a></h3>
2106 <h4>Description
</h4>
2107 <p>Add a collection value.
2112 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2114 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2117 <a href='#ipp_t'
>ipp_t
</a> * value);
2120 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2121 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2123 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2124 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2125 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2126 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2127 </tbody></table></div>
2129 <p>New attribute
</p>
2131 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippAddCollections'
>ippAddCollections()
</a></h3>
2132 <h4>Description
</h4>
2133 <p>Add an array of collection values.
2138 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2140 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2144 const
<a href='#ipp_t'
>ipp_t
</a> ** values);
2147 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2148 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2150 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2151 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2152 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2153 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2154 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2155 </tbody></table></div>
2157 <p>New attribute
</p>
2159 <h3 class='title'
><a name='ippAddDate'
>ippAddDate()
</a></h3>
2160 <h4>Description
</h4>
2161 <p>Add a date attribute to an IPP message.
</p>
2164 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2166 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2169 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> * value);
2172 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2173 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2175 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2176 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2177 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2178 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2179 </tbody></table></div>
2181 <p>New attribute
</p>
2183 <h3 class='title'
><a name='ippAddInteger'
>ippAddInteger()
</a></h3>
2184 <h4>Description
</h4>
2185 <p>Add a integer attribute to an IPP message.
</p>
2188 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2190 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2197 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2198 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2200 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2201 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2202 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2203 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2204 <tr><td><tt>value
</tt></td><td>Value of attribute
</td></tr>
2205 </tbody></table></div>
2207 <p>New attribute
</p>
2209 <h3 class='title'
><a name='ippAddIntegers'
>ippAddIntegers()
</a></h3>
2210 <h4>Description
</h4>
2211 <p>Add an array of integer values.
</p>
2214 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2216 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2221 const int * values);
2224 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2225 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2227 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2228 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2229 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2230 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2231 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2232 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2233 </tbody></table></div>
2235 <p>New attribute
</p>
2237 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippAddOctetString'
>ippAddOctetString()
</a></h3>
2238 <h4>Description
</h4>
2239 <p>Add an octetString value to an IPP message.
2244 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2246 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2253 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2254 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2256 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2257 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2258 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2259 <tr><td><tt>data
</tt></td><td>octetString data
</td></tr>
2260 <tr><td><tt>datalen
</tt></td><td>Length of data in bytes
</td></tr>
2261 </tbody></table></div>
2263 <p>New attribute
</p>
2265 <h3 class='title'
><a name='ippAddRange'
>ippAddRange()
</a></h3>
2266 <h4>Description
</h4>
2267 <p>Add a range of values to an IPP message.
</p>
2270 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2272 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2279 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2280 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2282 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2283 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2284 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2285 <tr><td><tt>lower
</tt></td><td>Lower value
</td></tr>
2286 <tr><td><tt>upper
</tt></td><td>Upper value
</td></tr>
2287 </tbody></table></div>
2289 <p>New attribute
</p>
2291 <h3 class='title'
><a name='ippAddRanges'
>ippAddRanges()
</a></h3>
2292 <h4>Description
</h4>
2293 <p>Add ranges of values to an IPP message.
</p>
2296 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2298 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2306 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2307 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2309 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2310 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2311 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2312 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2313 <tr><td><tt>lower
</tt></td><td>Lower values
</td></tr>
2314 <tr><td><tt>upper
</tt></td><td>Upper values
</td></tr>
2315 </tbody></table></div>
2317 <p>New attribute
</p>
2319 <h3 class='title'
><a name='ippAddResolution'
>ippAddResolution()
</a></h3>
2320 <h4>Description
</h4>
2321 <p>Add a resolution value to an IPP message.
</p>
2324 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2326 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2334 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2335 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2337 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2338 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2339 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2340 <tr><td><tt>units
</tt></td><td>Units for resolution
</td></tr>
2341 <tr><td><tt>xres
</tt></td><td>X resolution
</td></tr>
2342 <tr><td><tt>yres
</tt></td><td>Y resolution
</td></tr>
2343 </tbody></table></div>
2345 <p>New attribute
</p>
2347 <h3 class='title'
><a name='ippAddResolutions'
>ippAddResolutions()
</a></h3>
2348 <h4>Description
</h4>
2349 <p>Add resolution values to an IPP message.
</p>
2352 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2354 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2363 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2364 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2366 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2367 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2368 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2369 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2370 <tr><td><tt>units
</tt></td><td>Units for resolution
</td></tr>
2371 <tr><td><tt>xres
</tt></td><td>X resolutions
</td></tr>
2372 <tr><td><tt>yres
</tt></td><td>Y resolutions
</td></tr>
2373 </tbody></table></div>
2375 <p>New attribute
</p>
2377 <h3 class='title'
><a name='ippAddSeparator'
>ippAddSeparator()
</a></h3>
2378 <h4>Description
</h4>
2379 <p>Add a group separator to an IPP message.
</p>
2382 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2384 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2387 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2388 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2390 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2391 </tbody></table></div>
2393 <p>New attribute
</p>
2395 <h3 class='title'
><a name='ippAddString'
>ippAddString()
</a></h3>
2396 <h4>Description
</h4>
2397 <p>Add a language-encoded string to an IPP message.
</p>
2400 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2402 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2406 const char * charset,
2407 const char * value);
2410 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2411 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2413 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2414 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2415 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2416 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2417 <tr><td><tt>charset
</tt></td><td>Character set
</td></tr>
2418 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2419 </tbody></table></div>
2421 <p>New attribute
</p>
2423 <h3 class='title'
><a name='ippAddStrings'
>ippAddStrings()
</a></h3>
2424 <h4>Description
</h4>
2425 <p>Add language-encoded strings to an IPP message.
</p>
2428 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2430 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2435 const char * charset,
2436 const char *const * values);
2439 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2440 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2442 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2443 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2444 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2445 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2446 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2447 <tr><td><tt>charset
</tt></td><td>Character set
</td></tr>
2448 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2449 </tbody></table></div>
2451 <p>New attribute
</p>
2453 <h3 class='title'
><a name='ippDateToTime'
>ippDateToTime()
</a></h3>
2454 <h4>Description
</h4>
2455 <p>Convert from RFC
1903 Date/Time format to UNIX time
2461 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> * date);
2464 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2465 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2467 <tr><td><tt>date
</tt></td><td>RFC
1903 date info
</td></tr>
2468 </tbody></table></div>
2470 <p>UNIX time value
</p>
2472 <h3 class='title'
><a name='ippDelete'
>ippDelete()
</a></h3>
2473 <h4>Description
</h4>
2474 <p>Delete an IPP message.
</p>
2479 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2482 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2483 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2485 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2486 </tbody></table></div>
2490 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippDeleteAttribute'
>ippDeleteAttribute()
</a></h3>
2491 <h4>Description
</h4>
2492 <p>Delete a single attribute in an IPP message.
2499 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2500 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * attr);
2503 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2504 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2506 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2507 <tr><td><tt>attr
</tt></td><td>Attribute to delete
</td></tr>
2508 </tbody></table></div>
2512 <h3 class='title'
><a name='ippErrorString'
>ippErrorString()
</a></h3>
2513 <h4>Description
</h4>
2514 <p>Return a name for the given status code.
</p>
2519 ipp_status_t error);
2522 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2523 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2525 <tr><td><tt>error
</tt></td><td>Error status
</td></tr>
2526 </tbody></table></div>
2530 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippErrorValue'
>ippErrorValue()
</a></h3>
2531 <h4>Description
</h4>
2532 <p>Return a status code for the given name.
2542 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2543 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2545 <tr><td><tt>name
</tt></td><td>Name
</td></tr>
2546 </tbody></table></div>
2548 <p>IPP status code
</p>
2550 <h3 class='title'
><a name='ippFindAttribute'
>ippFindAttribute()
</a></h3>
2551 <h4>Description
</h4>
2552 <p>Find a named attribute in a request...
</p>
2555 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2557 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2562 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2563 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2565 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2566 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2567 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2568 </tbody></table></div>
2570 <p>Matching attribute
</p>
2572 <h3 class='title'
><a name='ippFindNextAttribute'
>ippFindNextAttribute()
</a></h3>
2573 <h4>Description
</h4>
2574 <p>Find the next named attribute in a request...
</p>
2577 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2578 ippFindNextAttribute(
2579 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2584 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2585 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2587 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2588 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2589 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2590 </tbody></table></div>
2592 <p>Matching attribute
</p>
2594 <h3 class='title'
><a name='ippLength'
>ippLength()
</a></h3>
2595 <h4>Description
</h4>
2596 <p>Compute the length of an IPP message.
</p>
2601 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2604 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2605 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2607 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2608 </tbody></table></div>
2610 <p>Size of IPP message
</p>
2612 <h3 class='title'
><a name='ippNew'
>ippNew()
</a></h3>
2613 <h4>Description
</h4>
2614 <p>Allocate a new IPP message.
</p>
2617 <a href='#ipp_t'
>ipp_t
</a> *
2623 <p>New IPP message
</p>
2625 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippNewRequest'
>ippNewRequest()
</a></h3>
2626 <h4>Description
</h4>
2627 <p>Allocate a new IPP request message.
2629 The new request message is initialized with the attributes-charset and
2630 attributes-natural-language attributes added. The
2631 attributes-natural-language value is derived from the current locale.
2636 <a href='#ipp_t'
>ipp_t
</a> *
2641 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2642 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2644 <tr><td><tt>op
</tt></td><td>Operation code
</td></tr>
2645 </tbody></table></div>
2647 <p>IPP request message
</p>
2649 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippOpString'
>ippOpString()
</a></h3>
2650 <h4>Description
</h4>
2651 <p>Return a name for the given operation id.
2661 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2662 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2664 <tr><td><tt>op
</tt></td><td>Operation ID
</td></tr>
2665 </tbody></table></div>
2669 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippOpValue'
>ippOpValue()
</a></h3>
2670 <h4>Description
</h4>
2671 <p>Return an operation id for the given name.
2681 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2682 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2684 <tr><td><tt>name
</tt></td><td>Textual name
</td></tr>
2685 </tbody></table></div>
2689 <h3 class='title'
><a name='ippPort'
>ippPort()
</a></h3>
2690 <h4>Description
</h4>
2691 <p>Return the default IPP port number.
</p>
2702 <h3 class='title'
><a name='ippRead'
>ippRead()
</a></h3>
2703 <h4>Description
</h4>
2704 <p>Read data for an IPP message from a HTTP connection.
</p>
2709 <a href='#http_t'
>http_t
</a> * http,
2710 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2713 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2714 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2716 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2717 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2718 </tbody></table></div>
2720 <p>Current state
</p>
2722 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippReadFile'
>ippReadFile()
</a></h3>
2723 <h4>Description
</h4>
2724 <p>Read data for an IPP message from a file.
2732 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2735 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2736 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2738 <tr><td><tt>fd
</tt></td><td>HTTP data
</td></tr>
2739 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2740 </tbody></table></div>
2742 <p>Current state
</p>
2744 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippReadIO'
>ippReadIO()
</a></h3>
2745 <h4>Description
</h4>
2746 <p>Read data for an IPP message.
2754 <a href='#ipp_iocb_t'
>ipp_iocb_t
</a> cb,
2756 <a href='#ipp_t'
>ipp_t
</a> * parent,
2757 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2760 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2761 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2763 <tr><td><tt>src
</tt></td><td>Data source
</td></tr>
2764 <tr><td><tt>cb
</tt></td><td>Read callback function
</td></tr>
2765 <tr><td><tt>blocking
</tt></td><td>Use blocking IO?
</td></tr>
2766 <tr><td><tt>parent
</tt></td><td>Parent request, if any
</td></tr>
2767 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2768 </tbody></table></div>
2770 <p>Current state
</p>
2772 <h3 class='title'
><a name='ippSetPort'
>ippSetPort()
</a></h3>
2773 <h4>Description
</h4>
2774 <p>Set the default port number.
</p>
2782 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2783 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2785 <tr><td><tt>p
</tt></td><td>Port number to use
</td></tr>
2786 </tbody></table></div>
2790 <h3 class='title'
><a name='ippTimeToDate'
>ippTimeToDate()
</a></h3>
2791 <h4>Description
</h4>
2792 <p>Convert from UNIX time to RFC
1903 format.
</p>
2795 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> *
2800 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2801 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2803 <tr><td><tt>t
</tt></td><td>UNIX time value
</td></tr>
2804 </tbody></table></div>
2806 <p>RFC-
1903 date/time data
</p>
2808 <h3 class='title'
><a name='ippWrite'
>ippWrite()
</a></h3>
2809 <h4>Description
</h4>
2810 <p>Write data for an IPP message to a HTTP connection.
</p>
2815 <a href='#http_t'
>http_t
</a> * http,
2816 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2819 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2820 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2822 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2823 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2824 </tbody></table></div>
2826 <p>Current state
</p>
2828 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippWriteFile'
>ippWriteFile()
</a></h3>
2829 <h4>Description
</h4>
2830 <p>Write data for an IPP message to a file.
2838 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2841 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2842 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2844 <tr><td><tt>fd
</tt></td><td>HTTP data
</td></tr>
2845 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2846 </tbody></table></div>
2848 <p>Current state
</p>
2850 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippWriteIO'
>ippWriteIO()
</a></h3>
2851 <h4>Description
</h4>
2852 <p>Write data for an IPP message.
2860 <a href='#ipp_iocb_t'
>ipp_iocb_t
</a> cb,
2862 <a href='#ipp_t'
>ipp_t
</a> * parent,
2863 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2866 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2867 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2869 <tr><td><tt>dst
</tt></td><td>Destination
</td></tr>
2870 <tr><td><tt>cb
</tt></td><td>Write callback function
</td></tr>
2871 <tr><td><tt>blocking
</tt></td><td>Use blocking IO?
</td></tr>
2872 <tr><td><tt>parent
</tt></td><td>Parent IPP message
</td></tr>
2873 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2874 </tbody></table></div>
2876 <p>Current state
</p>
2878 <h2 class='title'
><a name='STRUCTURES'
>Structures
</a></h2>
2880 <li><a href='#http_addrlist_s'
><tt>http_addrlist_s
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
2881 <li><a href='#ipp_attribute_s'
><tt>ipp_attribute_s
</tt></a> </li>
2882 <li><a href='#ipp_s'
><tt>ipp_s
</tt></a> </li>
2885 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='http_addrlist_s'
>http_addrlist_s
</a></h3>
2886 <h4>Description
</h4>
2887 <p>Socket address list, which is
2888 used to enumerate all of the
2889 addresses that are associated
2890 with a hostname.
</p>
2893 struct http_addrlist_s
2895 <a href='#http_addr_t'
>http_addr_t
</a> addr;
2896 struct
<a href='#http_addrlist_s'
>http_addrlist_s
</a> * next;
2900 <div class='table'
><table align='center' border='
1' width='
80%'
>
2901 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2903 <tr><td><tt>addr
</tt> </td><td>Address
</td></tr>
2904 <tr><td><tt>next
</tt> </td><td>Pointer to next address in list
</td></tr>
2905 </tbody></table></div>
2907 <h3 class='title'
><a name='ipp_attribute_s'
>ipp_attribute_s
</a></h3>
2908 <h4>Description
</h4>
2912 struct ipp_attribute_s
2915 struct
<a href='#ipp_attribute_s'
>ipp_attribute_s
</a> * next;
2917 ipp_tag_t group_tag, value_tag;
2918 <a href='#ipp_value_t'
>ipp_value_t
</a> values[
1];
2922 <div class='table'
><table align='center' border='
1' width='
80%'
>
2923 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2925 <tr><td><tt>name
</tt> </td><td>Name of attribute
</td></tr>
2926 <tr><td><tt>next
</tt> </td><td>Next attribute in list
</td></tr>
2927 <tr><td><tt>num_values
</tt> </td><td>Number of values
</td></tr>
2928 <tr><td><tt>value_tag
</tt> </td><td>What type of value is it?
</td></tr>
2929 <tr><td><tt>values[
1]
</tt> </td><td>Values
</td></tr>
2930 </tbody></table></div>
2932 <h3 class='title'
><a name='ipp_s'
>ipp_s
</a></h3>
2933 <h4>Description
</h4>
2934 <p>IPP Request/Response/Notification
</p>
2939 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * attrs;
2940 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * current;
2942 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * last;
2943 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * prev;
2944 <a href='#ipp_request_t'
>ipp_request_t
</a> request;
2949 <div class='table'
><table align='center' border='
1' width='
80%'
>
2950 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2952 <tr><td><tt>attrs
</tt> </td><td>Attributes
</td></tr>
2953 <tr><td><tt>current
</tt> </td><td>Current attribute (for read/write)
</td></tr>
2954 <tr><td><tt>curtag
</tt> </td><td>Current attribute group tag
</td></tr>
2955 <tr><td><tt>last
</tt> </td><td>Last attribute in list
</td></tr>
2956 <tr><td><tt>prev
</tt> </td><td>Previous attribute (for read)
</td></tr>
2957 <tr><td><tt>request
</tt> </td><td>Request header
</td></tr>
2958 <tr><td><tt>state
</tt> </td><td>State of request
</td></tr>
2959 </tbody></table></div>
2961 <h2 class='title'
><a name='TYPES'
>Types
</a></h2>
2963 <li><a href='#http_addrlist_t'
><tt>http_addrlist_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
2964 <li><a href='#http_auth_t'
><tt>http_auth_t
</tt></a> </li>
2965 <li><a href='#http_encoding_t'
><tt>http_encoding_t
</tt></a> </li>
2966 <li><a href='#http_encryption_t'
><tt>http_encryption_t
</tt></a> </li>
2967 <li><a href='#http_t'
><tt>http_t
</tt></a> </li>
2968 <li><a href='#ipp_attribute_t'
><tt>ipp_attribute_t
</tt></a> </li>
2969 <li><a href='#ipp_iocb_t'
><tt>ipp_iocb_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
2970 <li><a href='#ipp_request_t'
><tt>ipp_request_t
</tt></a> </li>
2971 <li><a href='#ipp_t'
><tt>ipp_t
</tt></a> </li>
2972 <li><a href='#ipp_uchar_t'
><tt>ipp_uchar_t
</tt></a> </li>
2973 <li><a href='#ipp_value_t'
><tt>ipp_value_t
</tt></a> </li>
2976 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='http_addrlist_t'
>http_addrlist_t
</a></h3>
2977 <h4>Description
</h4>
2978 <p>Socket address list, which is
2979 used to enumerate all of the
2980 addresses that are associated
2981 with a hostname.
</p>
2984 typedef struct
<a href='#http_addrlist_s'
>http_addrlist_s
</a> / http_addrlist_t;
2987 <h3 class='title'
><a name='http_auth_t'
>http_auth_t
</a></h3>
2988 <h4>Description
</h4>
2989 <p>HTTP authentication types
</p>
2992 typedef enum
<a href='#http_auth_e'
>http_auth_e
</a> http_auth_t;
2995 <h3 class='title'
><a name='http_encoding_t'
>http_encoding_t
</a></h3>
2996 <h4>Description
</h4>
2997 <p>HTTP transfer encoding values
</p>
3000 typedef enum
<a href='#http_encoding_e'
>http_encoding_e
</a> http_encoding_t;
3003 <h3 class='title'
><a name='http_encryption_t'
>http_encryption_t
</a></h3>
3004 <h4>Description
</h4>
3005 <p>HTTP encryption values
</p>
3008 typedef enum
<a href='#http_encryption_e'
>http_encryption_e
</a> http_encryption_t;
3011 <h3 class='title'
><a name='http_t'
>http_t
</a></h3>
3012 <h4>Description
</h4>
3013 <p>HTTP connection structure.
</p>
3016 typedef struct _http_s http_t;
3019 <h3 class='title'
><a name='ipp_attribute_t'
>ipp_attribute_t
</a></h3>
3020 <h4>Description
</h4>
3024 typedef struct
<a href='#ipp_attribute_s'
>ipp_attribute_s
</a> ipp_attribute_t;
3027 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ipp_iocb_t'
>ipp_iocb_t
</a></h3>
3028 <h4>Description
</h4>
3029 <p>IPP IO Callback Function
</p>
3032 typedef ssize_t (*ipp_iocb_t)(void *,
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> *, size_t);
3035 <h3 class='title'
><a name='ipp_request_t'
>ipp_request_t
</a></h3>
3036 <h4>Description
</h4>
3037 <p>Request Header
</p>
3040 typedef union
<a href='#ipp_request_u'
>ipp_request_u
</a> ipp_request_t;
3043 <h3 class='title'
><a name='ipp_t'
>ipp_t
</a></h3>
3044 <h4>Description
</h4>
3045 <p>Attribute Value
</p>
3048 typedef struct
<a href='#ipp_s'
>ipp_s
</a> ipp_t;
3051 <h3 class='title'
><a name='ipp_uchar_t'
>ipp_uchar_t
</a></h3>
3052 <h4>Description
</h4>
3053 <p>IPP status codes...
</p>
3056 typedef typedef unsigned char ipp_uchar_t;
3059 <h3 class='title'
><a name='ipp_value_t'
>ipp_value_t
</a></h3>
3060 <h4>Description
</h4>
3061 <p>New in CUPS
1.1.19</p>
3064 typedef union
<a href='#ipp_value_u'
>ipp_value_u
</a> ipp_value_t;
3067 <h2 class='title'
><a name='UNIONS'
>Unions
</a></h2>
3069 <li><a href='#ipp_request_u'
><tt>ipp_request_u
</tt></a> </li>
3070 <li><a href='#ipp_value_u'
><tt>ipp_value_u
</tt></a> </li>
3073 <h3 class='title'
><a name='ipp_request_u'
>ipp_request_u
</a></h3>
3074 <h4>Description
</h4>
3075 <p>Request Header
</p>
3083 <div class='table'
><table align='center' border='
1' width='
80%'
>
3084 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3086 </tbody></table></div>
3088 <h3 class='title'
><a name='ipp_value_u'
>ipp_value_u
</a></h3>
3089 <h4>Description
</h4>
3090 <p>New in CUPS
1.1.19</p>
3096 <a href='#ipp_t'
>ipp_t
</a> * collection;
3097 <a href='#ipp_uchar_t'
>ipp_uchar_t
</a> date[
11];
3102 <div class='table'
><table align='center' border='
1' width='
80%'
>
3103 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3105 <tr><td><tt>boolean
</tt> </td><td>Boolean value
</td></tr>
3106 <tr><td><tt>collection
</tt> </td><td>Collection value
</td></tr>
3107 <tr><td><tt>date[
11]
</tt> </td><td>Date/time value
</td></tr>
3108 <tr><td><tt>integer
</tt> </td><td>Integer/enumerated value
</td></tr>
3109 </tbody></table></div>