]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> |
2 | <html> | |
3 | <!-- SECTION: Programming --> | |
4 | <head> | |
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; } | |
15 | --></style> | |
16 | </head> | |
17 | <body> | |
18 | <!-- | |
b423cd4c | 19 | "$Id: api-httpipp.shtml 5138 2006-02-21 10:49:06Z mike $" |
ef416fc2 | 20 | |
21 | HTTP and IPP API introduction for the Common UNIX Printing System (CUPS). | |
22 | ||
ecdc0628 | 23 | Copyright 1997-2006 by Easy Software Products. |
ef416fc2 | 24 | |
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 | |
30 | at: | |
31 | ||
32 | Attn: CUPS Licensing Information | |
33 | Easy Software Products | |
34 | 44141 Airport View Drive, Suite 204 | |
35 | Hollywood, Maryland 20636 USA | |
36 | ||
37 | Voice: (301) 373-9600 | |
38 | EMail: cups-info@cups.org | |
39 | WWW: http://www.cups.org | |
40 | --> | |
41 | ||
42 | <h2 class='title'>Introduction</h2> | |
43 | ||
ecdc0628 | 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 | |
48 | functions.</p> | |
ef416fc2 | 49 | |
50 | <h2 class='title'>General Usage</h2> | |
51 | ||
52 | <p>The <var><cups/cups.h></var> header file must be included to | |
53 | use the HTTP and IPP functions.</p> | |
54 | ||
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 | |
60 | library:</p> | |
61 | ||
62 | <pre class='command'> | |
63 | <kbd>gcc -o myprogram myprogram.c -lcups</kbd> | |
64 | </pre> | |
65 | ||
66 | <h2 class='title'>Compatibility</h2> | |
67 | ||
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> | |
71 | <ul> | |
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> | |
ecdc0628 | 76 | <li><a href='#UNIONS'>Unions</a></li> |
ef416fc2 | 77 | </ul> |
78 | <!-- NEW PAGE --> | |
79 | <h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2> | |
80 | <ul> | |
ef416fc2 | 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> | |
ecdc0628 | 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> | |
ef416fc2 | 90 | </ul> |
91 | <!-- NEW PAGE --> | |
ef416fc2 | 92 | <h3 class='title'><a name='http_auth_e'>http_auth_e</a></h3> |
93 | <h4>Description</h4> | |
94 | <p>HTTP authentication types</p> | |
95 | <h4>Values</h4> | |
96 | <div class='table'><table align='center' border='1' width='80%'> | |
97 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
98 | <tbody> | |
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> | |
106 | <!-- NEW PAGE --> | |
107 | <h3 class='title'><a name='http_encoding_e'>http_encoding_e</a></h3> | |
108 | <h4>Description</h4> | |
109 | <p>HTTP transfer encoding values</p> | |
110 | <h4>Values</h4> | |
111 | <div class='table'><table align='center' border='1' width='80%'> | |
112 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
113 | <tbody> | |
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> | |
117 | <!-- NEW PAGE --> | |
118 | <h3 class='title'><a name='http_encryption_e'>http_encryption_e</a></h3> | |
119 | <h4>Description</h4> | |
120 | <p>HTTP encryption values</p> | |
121 | <h4>Values</h4> | |
122 | <div class='table'><table align='center' border='1' width='80%'> | |
123 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
124 | <tbody> | |
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> | |
130 | <!-- NEW PAGE --> | |
131 | <h3 class='title'><a name='http_field_e'>http_field_e</a></h3> | |
132 | <h4>Description</h4> | |
133 | <p>HTTP field names</p> | |
134 | <h4>Values</h4> | |
135 | <div class='table'><table align='center' border='1' width='80%'> | |
136 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
137 | <tbody> | |
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> | |
168 | <!-- NEW PAGE --> | |
169 | <h3 class='title'><a name='http_keepalive_e'>http_keepalive_e</a></h3> | |
170 | <h4>Description</h4> | |
171 | <p>Types and structures...</p> | |
172 | <h4>Values</h4> | |
173 | <div class='table'><table align='center' border='1' width='80%'> | |
174 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
175 | <tbody> | |
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> | |
179 | <!-- NEW PAGE --> | |
180 | <h3 class='title'><a name='http_status_e'>http_status_e</a></h3> | |
181 | <h4>Description</h4> | |
182 | <p>HTTP status codes</p> | |
183 | <h4>Values</h4> | |
184 | <div class='table'><table align='center' border='1' width='80%'> | |
185 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
186 | <tbody> | |
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_FORBIDDEN</tt> </td><td>Forbidden to access this URI</td></tr> | |
195 | <tr><td><tt>HTTP_GATEWAY_TIMEOUT</tt> </td><td>Gateway connection timed out</td></tr> | |
196 | <tr><td><tt>HTTP_GONE</tt> </td><td>Server has gone away</td></tr> | |
197 | <tr><td><tt>HTTP_LENGTH_REQUIRED</tt> </td><td>A content length or encoding is required</td></tr> | |
198 | <tr><td><tt>HTTP_METHOD_NOT_ALLOWED</tt> </td><td>Method is not allowed</td></tr> | |
199 | <tr><td><tt>HTTP_MOVED_PERMANENTLY</tt> </td><td>Document has moved permanently</td></tr> | |
200 | <tr><td><tt>HTTP_MOVED_TEMPORARILY</tt> </td><td>Document has moved temporarily</td></tr> | |
201 | <tr><td><tt>HTTP_MULTIPLE_CHOICES</tt> </td><td>Multiple files match request</td></tr> | |
202 | <tr><td><tt>HTTP_NOT_ACCEPTABLE</tt> </td><td>Not Acceptable</td></tr> | |
203 | <tr><td><tt>HTTP_NOT_AUTHORITATIVE</tt> </td><td>Information isn't authoritative</td></tr> | |
204 | <tr><td><tt>HTTP_NOT_FOUND</tt> </td><td>URI was not found</td></tr> | |
205 | <tr><td><tt>HTTP_NOT_IMPLEMENTED</tt> </td><td>Feature not implemented</td></tr> | |
206 | <tr><td><tt>HTTP_NOT_MODIFIED</tt> </td><td>File not modified</td></tr> | |
207 | <tr><td><tt>HTTP_NOT_SUPPORTED</tt> </td><td>HTTP version not supported</td></tr> | |
208 | <tr><td><tt>HTTP_NO_CONTENT</tt> </td><td>Successful command, no new data</td></tr> | |
209 | <tr><td><tt>HTTP_OK</tt> </td><td>OPTIONS/GET/HEAD/POST/TRACE command was successful</td></tr> | |
210 | <tr><td><tt>HTTP_PARTIAL_CONTENT</tt> </td><td>Only a partial file was recieved/sent</td></tr> | |
211 | <tr><td><tt>HTTP_PAYMENT_REQUIRED</tt> </td><td>Payment required</td></tr> | |
212 | <tr><td><tt>HTTP_PRECONDITION</tt> </td><td>Precondition failed</td></tr> | |
213 | <tr><td><tt>HTTP_PROXY_AUTHENTICATION</tt> </td><td>Proxy Authentication is Required</td></tr> | |
214 | <tr><td><tt>HTTP_REQUEST_TIMEOUT</tt> </td><td>Request timed out</td></tr> | |
215 | <tr><td><tt>HTTP_REQUEST_TOO_LARGE</tt> </td><td>Request entity too large</td></tr> | |
216 | <tr><td><tt>HTTP_RESET_CONTENT</tt> </td><td>Content was reset/recreated</td></tr> | |
217 | <tr><td><tt>HTTP_SEE_OTHER</tt> </td><td>See this other link...</td></tr> | |
218 | <tr><td><tt>HTTP_SERVER_ERROR</tt> </td><td>Internal server error</td></tr> | |
219 | <tr><td><tt>HTTP_SERVICE_UNAVAILABLE</tt> </td><td>Service is unavailable</td></tr> | |
220 | <tr><td><tt>HTTP_SWITCHING_PROTOCOLS</tt> </td><td>HTTP upgrade to TLS/SSL</td></tr> | |
221 | <tr><td><tt>HTTP_UNAUTHORIZED</tt> </td><td>Unauthorized to access host</td></tr> | |
222 | <tr><td><tt>HTTP_UNSUPPORTED_MEDIATYPE</tt> </td><td>The requested media type is unsupported</td></tr> | |
223 | <tr><td><tt>HTTP_UPGRADE_REQUIRED</tt> </td><td>Upgrade to SSL/TLS required</td></tr> | |
224 | <tr><td><tt>HTTP_URI_TOO_LONG</tt> </td><td>URI too long</td></tr> | |
225 | <tr><td><tt>HTTP_USE_PROXY</tt> </td><td>Must use a proxy to access this URI</td></tr> | |
226 | </tbody></table></div> | |
227 | <!-- NEW PAGE --> | |
ecdc0628 | 228 | <h3 class='title'><a name='ipp_res_e'>ipp_res_e</a></h3> |
229 | <h4>Description</h4> | |
230 | <p>Types and structures...</p> | |
231 | <h4>Values</h4> | |
232 | <div class='table'><table align='center' border='1' width='80%'> | |
233 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
234 | <tbody> | |
235 | <tr><td><tt>IPP_RES_PER_CM</tt> </td><td>Pixels per centimeter</td></tr> | |
236 | <tr><td><tt>IPP_RES_PER_INCH</tt> </td><td>Pixels per inch</td></tr> | |
237 | </tbody></table></div> | |
238 | <!-- NEW PAGE --> | |
239 | <h3 class='title'><a name='ipp_status_e'>ipp_status_e</a></h3> | |
240 | <h4>Description</h4> | |
241 | <p>IPP status codes...</p> | |
242 | <h4>Values</h4> | |
243 | <div class='table'><table align='center' border='1' width='80%'> | |
244 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
245 | <tbody> | |
246 | <tr><td><tt>IPP_ATTRIBUTES</tt> </td><td>client-error-attributes-or-values-not-supported</td></tr> | |
247 | <tr><td><tt>IPP_ATTRIBUTES_NOT_SETTABLE</tt> </td><td>client-error-attributes-not-settable</td></tr> | |
248 | <tr><td><tt>IPP_BAD_REQUEST</tt> </td><td>client-error-bad-request</td></tr> | |
249 | <tr><td><tt>IPP_CHARSET</tt> </td><td>client-error-charset-not-supported</td></tr> | |
250 | <tr><td><tt>IPP_COMPRESSION_ERROR</tt> </td><td>client-error-compression-error</td></tr> | |
251 | <tr><td><tt>IPP_COMPRESSION_NOT_SUPPORTED</tt> </td><td>client-error-compression-not-supported</td></tr> | |
252 | <tr><td><tt>IPP_CONFLICT</tt> </td><td>client-error-conflicting-attributes</td></tr> | |
253 | <tr><td><tt>IPP_DEVICE_ERROR</tt> </td><td>server-error-device-error</td></tr> | |
254 | <tr><td><tt>IPP_DOCUMENT_ACCESS_ERROR</tt> </td><td>client-error-document-access-error</td></tr> | |
255 | <tr><td><tt>IPP_DOCUMENT_FORMAT</tt> </td><td>client-error-document-format-not-supported</td></tr> | |
256 | <tr><td><tt>IPP_DOCUMENT_FORMAT_ERROR</tt> </td><td>client-error-document-format-error</td></tr> | |
257 | <tr><td><tt>IPP_ERROR_JOB_CANCELLED</tt> </td><td>server-error-job-canceled</td></tr> | |
258 | <tr><td><tt>IPP_FORBIDDEN</tt> </td><td>client-error-forbidden</td></tr> | |
259 | <tr><td><tt>IPP_GONE</tt> </td><td>client-error-gone</td></tr> | |
260 | <tr><td><tt>IPP_IGNORED_ALL_NOTIFICATIONS</tt> </td><td>client-error-ignored-all-notifications</td></tr> | |
261 | <tr><td><tt>IPP_IGNORED_ALL_SUBSCRIPTIONS</tt> </td><td>client-error-ignored-all-subscriptions</td></tr> | |
262 | <tr><td><tt>IPP_INTERNAL_ERROR</tt> </td><td>server-error-internal-error</td></tr> | |
263 | <tr><td><tt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED</tt> </td><td>server-error-multiple-document-jobs-not-supported</td></tr> | |
264 | <tr><td><tt>IPP_NOT_ACCEPTING</tt> </td><td>server-error-not-accepting-jobs</td></tr> | |
265 | <tr><td><tt>IPP_NOT_AUTHENTICATED</tt> </td><td>client-error-not-authenticated</td></tr> | |
266 | <tr><td><tt>IPP_NOT_AUTHORIZED</tt> </td><td>client-error-not-authorized</td></tr> | |
267 | <tr><td><tt>IPP_NOT_FOUND</tt> </td><td>client-error-not-found</td></tr> | |
268 | <tr><td><tt>IPP_NOT_POSSIBLE</tt> </td><td>client-error-not-possible</td></tr> | |
269 | <tr><td><tt>IPP_OK</tt> </td><td>successful-ok</td></tr> | |
270 | <tr><td><tt>IPP_OK_BUT_CANCEL_SUBSCRIPTION</tt> </td><td>successful-ok-but-cancel-subscription</td></tr> | |
271 | <tr><td><tt>IPP_OK_CONFLICT</tt> </td><td>successful-ok-conflicting-attributes</td></tr> | |
272 | <tr><td><tt>IPP_OK_EVENTS_COMPLETE</tt> </td><td>successful-ok-events-complete</td></tr> | |
273 | <tr><td><tt>IPP_OK_IGNORED_NOTIFICATIONS</tt> </td><td>successful-ok-ignored-notifications</td></tr> | |
274 | <tr><td><tt>IPP_OK_IGNORED_SUBSCRIPTIONS</tt> </td><td>successful-ok-ignored-subscriptions</td></tr> | |
275 | <tr><td><tt>IPP_OK_SUBST</tt> </td><td>successful-ok-ignored-or-substituted-attributes</td></tr> | |
276 | <tr><td><tt>IPP_OK_TOO_MANY_EVENTS</tt> </td><td>successful-ok-too-many-events</td></tr> | |
277 | <tr><td><tt>IPP_OPERATION_NOT_SUPPORTED</tt> </td><td>server-error-operation-not-supported</td></tr> | |
278 | <tr><td><tt>IPP_PRINTER_BUSY</tt> </td><td>server-error-busy</td></tr> | |
279 | <tr><td><tt>IPP_PRINTER_IS_DEACTIVATED</tt> </td><td>server-error-printer-is-deactivated</td></tr> | |
280 | <tr><td><tt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND</tt> </td><td>client-error-print-support-file-not-found</td></tr> | |
281 | <tr><td><tt>IPP_REDIRECTION_OTHER_SITE</tt> </td><td></td></tr> | |
282 | <tr><td><tt>IPP_REQUEST_ENTITY</tt> </td><td>client-error-request-entity-too-large</td></tr> | |
283 | <tr><td><tt>IPP_REQUEST_VALUE</tt> </td><td>client-error-request-value-too-long</td></tr> | |
284 | <tr><td><tt>IPP_SERVICE_UNAVAILABLE</tt> </td><td>server-error-service-unavailable</td></tr> | |
285 | <tr><td><tt>IPP_TEMPORARY_ERROR</tt> </td><td>server-error-temporary-error</td></tr> | |
286 | <tr><td><tt>IPP_TIMEOUT</tt> </td><td>client-error-timeout</td></tr> | |
287 | <tr><td><tt>IPP_TOO_MANY_SUBSCRIPTIONS</tt> </td><td>client-error-too-many-subscriptions</td></tr> | |
288 | <tr><td><tt>IPP_URI_SCHEME</tt> </td><td>client-error-uri-scheme-not-supported</td></tr> | |
289 | <tr><td><tt>IPP_VERSION_NOT_SUPPORTED</tt> </td><td>server-error-version-not-supported</td></tr> | |
290 | </tbody></table></div> | |
291 | <!-- NEW PAGE --> | |
292 | <h3 class='title'><a name='ipp_tag_e'>ipp_tag_e</a></h3> | |
293 | <h4>Description</h4> | |
294 | <p>Format tags for attributes...</p> | |
295 | <h4>Values</h4> | |
296 | <div class='table'><table align='center' border='1' width='80%'> | |
297 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
298 | <tbody> | |
299 | <tr><td><tt>IPP_TAG_ADMINDEFINE</tt> </td><td>Admin-defined value</td></tr> | |
300 | <tr><td><tt>IPP_TAG_BEGIN_COLLECTION</tt> </td><td>Beginning of collection value</td></tr> | |
301 | <tr><td><tt>IPP_TAG_BOOLEAN</tt> </td><td>Boolean value</td></tr> | |
302 | <tr><td><tt>IPP_TAG_CHARSET</tt> </td><td>Character set value</td></tr> | |
303 | <tr><td><tt>IPP_TAG_COPY</tt> </td><td>Bitflag for copied attribute values</td></tr> | |
304 | <tr><td><tt>IPP_TAG_DATE</tt> </td><td>Date/time value</td></tr> | |
305 | <tr><td><tt>IPP_TAG_DEFAULT</tt> </td><td>Default value</td></tr> | |
306 | <tr><td><tt>IPP_TAG_DELETEATTR</tt> </td><td>Delete-attribute value</td></tr> | |
307 | <tr><td><tt>IPP_TAG_END</tt> </td><td>End-of-attributes</td></tr> | |
308 | <tr><td><tt>IPP_TAG_END_COLLECTION</tt> </td><td>End of collection value</td></tr> | |
309 | <tr><td><tt>IPP_TAG_ENUM</tt> </td><td>Enumeration value</td></tr> | |
310 | <tr><td><tt>IPP_TAG_EVENT_NOTIFICATION</tt> </td><td>Event group</td></tr> | |
311 | <tr><td><tt>IPP_TAG_INTEGER</tt> </td><td>Integer value</td></tr> | |
312 | <tr><td><tt>IPP_TAG_JOB</tt> </td><td>Job group</td></tr> | |
313 | <tr><td><tt>IPP_TAG_KEYWORD</tt> </td><td>Keyword value</td></tr> | |
314 | <tr><td><tt>IPP_TAG_LANGUAGE</tt> </td><td>Language value</td></tr> | |
315 | <tr><td><tt>IPP_TAG_MASK</tt> </td><td>Mask for copied attribute values</td></tr> | |
316 | <tr><td><tt>IPP_TAG_MEMBERNAME</tt> </td><td>Collection member name value</td></tr> | |
317 | <tr><td><tt>IPP_TAG_MIMETYPE</tt> </td><td>MIME media type value</td></tr> | |
318 | <tr><td><tt>IPP_TAG_NAME</tt> </td><td>Name value</td></tr> | |
319 | <tr><td><tt>IPP_TAG_NAMELANG</tt> </td><td>Name-with-language value</td></tr> | |
320 | <tr><td><tt>IPP_TAG_NOTSETTABLE</tt> </td><td>Not-settable value</td></tr> | |
321 | <tr><td><tt>IPP_TAG_NOVALUE</tt> </td><td>No-value value</td></tr> | |
322 | <tr><td><tt>IPP_TAG_OPERATION</tt> </td><td>Operation group</td></tr> | |
323 | <tr><td><tt>IPP_TAG_PRINTER</tt> </td><td>Printer group</td></tr> | |
324 | <tr><td><tt>IPP_TAG_RANGE</tt> </td><td>Range value</td></tr> | |
325 | <tr><td><tt>IPP_TAG_RESOLUTION</tt> </td><td>Resolution value</td></tr> | |
326 | <tr><td><tt>IPP_TAG_STRING</tt> </td><td>Octet string value</td></tr> | |
327 | <tr><td><tt>IPP_TAG_SUBSCRIPTION</tt> </td><td>Subscription group</td></tr> | |
328 | <tr><td><tt>IPP_TAG_TEXT</tt> </td><td>Text value</td></tr> | |
329 | <tr><td><tt>IPP_TAG_TEXTLANG</tt> </td><td>Text-with-language value</td></tr> | |
330 | <tr><td><tt>IPP_TAG_UNKNOWN</tt> </td><td>Unknown value</td></tr> | |
331 | <tr><td><tt>IPP_TAG_UNSUPPORTED_GROUP</tt> </td><td>Unsupported attributes group</td></tr> | |
332 | <tr><td><tt>IPP_TAG_UNSUPPORTED_VALUE</tt> </td><td>Unsupported value</td></tr> | |
333 | <tr><td><tt>IPP_TAG_URI</tt> </td><td>URI value</td></tr> | |
334 | <tr><td><tt>IPP_TAG_URISCHEME</tt> </td><td>URI scheme value</td></tr> | |
335 | <tr><td><tt>IPP_TAG_ZERO</tt> </td><td>Zero tag - used for separators</td></tr> | |
336 | </tbody></table></div> | |
337 | <!-- NEW PAGE --> | |
ef416fc2 | 338 | <h2 class='title'><a name='FUNCTIONS'>Functions</a></h2> |
339 | <ul> | |
ef416fc2 | 340 | <li><a href='#cupsDoAuthentication'><tt>cupsDoAuthentication()</tt></a> <span class='info'> CUPS 1.1.20 </span></li> |
341 | <li><a href='#cupsDoFileRequest'><tt>cupsDoFileRequest()</tt></a> </li> | |
ecdc0628 | 342 | <li><a href='#cupsDoRequest'><tt>cupsDoRequest()</tt></a> </li> |
ef416fc2 | 343 | <li><a href='#cupsEncodeOptions'><tt>cupsEncodeOptions()</tt></a> </li> |
344 | <li><a href='#cupsEncodeOptions2'><tt>cupsEncodeOptions2()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
ef416fc2 | 345 | <li><a href='#httpAddrAny'><tt>httpAddrAny()</tt></a> <span class='info'> CUPS 1.2 </span></li> |
346 | <li><a href='#httpAddrEqual'><tt>httpAddrEqual()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
347 | <li><a href='#httpAddrLength'><tt>httpAddrLength()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
348 | <li><a href='#httpAddrLocalhost'><tt>httpAddrLocalhost()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
349 | <li><a href='#httpAddrLookup'><tt>httpAddrLookup()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
350 | <li><a href='#httpAddrString'><tt>httpAddrString()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
351 | <li><a href='#httpAssembleURI'><tt>httpAssembleURI()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
352 | <li><a href='#httpAssembleURIf'><tt>httpAssembleURIf()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
ecdc0628 | 353 | <li><a href='#httpBlocking'><tt>httpBlocking()</tt></a> </li> |
ef416fc2 | 354 | <li><a href='#httpCheck'><tt>httpCheck()</tt></a> </li> |
355 | <li><a href='#httpClearCookie'><tt>httpClearCookie()</tt></a> <span class='info'> CUPS 1.1.19 </span></li> | |
ecdc0628 | 356 | <li><a href='#httpClearFields'><tt>httpClearFields()</tt></a> </li> |
ef416fc2 | 357 | <li><a href='#httpClose'><tt>httpClose()</tt></a> </li> |
358 | <li><a href='#httpConnect'><tt>httpConnect()</tt></a> </li> | |
359 | <li><a href='#httpConnectEncrypt'><tt>httpConnectEncrypt()</tt></a> </li> | |
ecdc0628 | 360 | <li><a href='#httpDecode64'><tt>httpDecode64()</tt></a> <span class='info'> DEPRECATED </span></li> |
ef416fc2 | 361 | <li><a href='#httpDecode64_2'><tt>httpDecode64_2()</tt></a> <span class='info'> CUPS 1.1.21 </span></li> |
362 | <li><a href='#httpDelete'><tt>httpDelete()</tt></a> </li> | |
ecdc0628 | 363 | <li><a href='#httpEncode64'><tt>httpEncode64()</tt></a> <span class='info'> DEPRECATED </span></li> |
ef416fc2 | 364 | <li><a href='#httpEncode64_2'><tt>httpEncode64_2()</tt></a> <span class='info'> CUPS 1.1.21 </span></li> |
365 | <li><a href='#httpEncryption'><tt>httpEncryption()</tt></a> </li> | |
ecdc0628 | 366 | <li><a href='#httpError'><tt>httpError()</tt></a> </li> |
ef416fc2 | 367 | <li><a href='#httpFlush'><tt>httpFlush()</tt></a> </li> |
368 | <li><a href='#httpFlushWrite'><tt>httpFlushWrite()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
369 | <li><a href='#httpGet'><tt>httpGet()</tt></a> </li> | |
ecdc0628 | 370 | <li><a href='#httpGetBlocking'><tt>httpGetBlocking()</tt></a> <span class='info'> CUPS 1.2 </span></li> |
371 | <li><a href='#httpGetCookie'><tt>httpGetCookie()</tt></a> </li> | |
ef416fc2 | 372 | <li><a href='#httpGetDateString'><tt>httpGetDateString()</tt></a> <span class='info'> DEPRECATED </span></li> |
373 | <li><a href='#httpGetDateString2'><tt>httpGetDateString2()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
374 | <li><a href='#httpGetDateTime'><tt>httpGetDateTime()</tt></a> </li> | |
ecdc0628 | 375 | <li><a href='#httpGetFd'><tt>httpGetFd()</tt></a> <span class='info'> CUPS 1.2 </span></li> |
376 | <li><a href='#httpGetField'><tt>httpGetField()</tt></a> </li> | |
ef416fc2 | 377 | <li><a href='#httpGetHostByName'><tt>httpGetHostByName()</tt></a> <span class='info'> DEPRECATED </span></li> |
378 | <li><a href='#httpGetHostname'><tt>httpGetHostname()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
ecdc0628 | 379 | <li><a href='#httpGetLength'><tt>httpGetLength()</tt></a> <span class='info'> DEPRECATED </span></li> |
380 | <li><a href='#httpGetLength2'><tt>httpGetLength2()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
381 | <li><a href='#httpGetStatus'><tt>httpGetStatus()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
ef416fc2 | 382 | <li><a href='#httpGetSubField'><tt>httpGetSubField()</tt></a> <span class='info'> DEPRECATED </span></li> |
383 | <li><a href='#httpGetSubField2'><tt>httpGetSubField2()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
384 | <li><a href='#httpGets'><tt>httpGets()</tt></a> </li> | |
385 | <li><a href='#httpHead'><tt>httpHead()</tt></a> </li> | |
386 | <li><a href='#httpInitialize'><tt>httpInitialize()</tt></a> </li> | |
387 | <li><a href='#httpMD5'><tt>httpMD5()</tt></a> </li> | |
388 | <li><a href='#httpMD5Final'><tt>httpMD5Final()</tt></a> </li> | |
389 | <li><a href='#httpMD5String'><tt>httpMD5String()</tt></a> </li> | |
390 | <li><a href='#httpOptions'><tt>httpOptions()</tt></a> </li> | |
391 | <li><a href='#httpPost'><tt>httpPost()</tt></a> </li> | |
ef416fc2 | 392 | <li><a href='#httpPut'><tt>httpPut()</tt></a> </li> |
ecdc0628 | 393 | <li><a href='#httpRead'><tt>httpRead()</tt></a> <span class='info'> DEPRECATED </span></li> |
394 | <li><a href='#httpRead2'><tt>httpRead2()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
ef416fc2 | 395 | <li><a href='#httpReconnect'><tt>httpReconnect()</tt></a> </li> |
ecdc0628 | 396 | <li><a href='#httpSeparate'><tt>httpSeparate()</tt></a> <span class='info'> DEPRECATED </span></li> |
ef416fc2 | 397 | <li><a href='#httpSeparate2'><tt>httpSeparate2()</tt></a> <span class='info'> CUPS 1.1.21 </span></li> |
398 | <li><a href='#httpSeparateURI'><tt>httpSeparateURI()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
399 | <li><a href='#httpSetCookie'><tt>httpSetCookie()</tt></a> <span class='info'> CUPS 1.1.19 </span></li> | |
400 | <li><a href='#httpSetField'><tt>httpSetField()</tt></a> </li> | |
401 | <li><a href='#httpSetLength'><tt>httpSetLength()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
402 | <li><a href='#httpStatus'><tt>httpStatus()</tt></a> </li> | |
403 | <li><a href='#httpTrace'><tt>httpTrace()</tt></a> </li> | |
404 | <li><a href='#httpUpdate'><tt>httpUpdate()</tt></a> </li> | |
405 | <li><a href='#httpWait'><tt>httpWait()</tt></a> <span class='info'> CUPS 1.1.19 </span></li> | |
ecdc0628 | 406 | <li><a href='#httpWrite'><tt>httpWrite()</tt></a> <span class='info'> DEPRECATED </span></li> |
407 | <li><a href='#httpWrite2'><tt>httpWrite2()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
ef416fc2 | 408 | <li><a href='#ippAddBoolean'><tt>ippAddBoolean()</tt></a> </li> |
409 | <li><a href='#ippAddBooleans'><tt>ippAddBooleans()</tt></a> </li> | |
410 | <li><a href='#ippAddCollection'><tt>ippAddCollection()</tt></a> <span class='info'> CUPS 1.1.19 </span></li> | |
411 | <li><a href='#ippAddCollections'><tt>ippAddCollections()</tt></a> <span class='info'> CUPS 1.1.19 </span></li> | |
412 | <li><a href='#ippAddDate'><tt>ippAddDate()</tt></a> </li> | |
413 | <li><a href='#ippAddInteger'><tt>ippAddInteger()</tt></a> </li> | |
ecdc0628 | 414 | <li><a href='#ippAddIntegers'><tt>ippAddIntegers()</tt></a> </li> |
415 | <li><a href='#ippAddOctetString'><tt>ippAddOctetString()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
416 | <li><a href='#ippAddRange'><tt>ippAddRange()</tt></a> </li> | |
417 | <li><a href='#ippAddRanges'><tt>ippAddRanges()</tt></a> </li> | |
418 | <li><a href='#ippAddResolution'><tt>ippAddResolution()</tt></a> </li> | |
419 | <li><a href='#ippAddResolutions'><tt>ippAddResolutions()</tt></a> </li> | |
420 | <li><a href='#ippAddSeparator'><tt>ippAddSeparator()</tt></a> </li> | |
421 | <li><a href='#ippAddString'><tt>ippAddString()</tt></a> </li> | |
422 | <li><a href='#ippAddStrings'><tt>ippAddStrings()</tt></a> </li> | |
423 | <li><a href='#ippDateToTime'><tt>ippDateToTime()</tt></a> </li> | |
424 | <li><a href='#ippDelete'><tt>ippDelete()</tt></a> </li> | |
425 | <li><a href='#ippDeleteAttribute'><tt>ippDeleteAttribute()</tt></a> <span class='info'> CUPS 1.1.19 </span></li> | |
426 | <li><a href='#ippErrorString'><tt>ippErrorString()</tt></a> </li> | |
427 | <li><a href='#ippErrorValue'><tt>ippErrorValue()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
428 | <li><a href='#ippFindAttribute'><tt>ippFindAttribute()</tt></a> </li> | |
429 | <li><a href='#ippFindNextAttribute'><tt>ippFindNextAttribute()</tt></a> </li> | |
430 | <li><a href='#ippLength'><tt>ippLength()</tt></a> </li> | |
431 | <li><a href='#ippNew'><tt>ippNew()</tt></a> </li> | |
432 | <li><a href='#ippNewRequest'><tt>ippNewRequest()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
433 | <li><a href='#ippOpString'><tt>ippOpString()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
434 | <li><a href='#ippOpValue'><tt>ippOpValue()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
435 | <li><a href='#ippPort'><tt>ippPort()</tt></a> </li> | |
436 | <li><a href='#ippRead'><tt>ippRead()</tt></a> </li> | |
437 | <li><a href='#ippReadFile'><tt>ippReadFile()</tt></a> <span class='info'> CUPS 1.1.19 </span></li> | |
438 | <li><a href='#ippReadIO'><tt>ippReadIO()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
439 | <li><a href='#ippSetPort'><tt>ippSetPort()</tt></a> </li> | |
440 | <li><a href='#ippTimeToDate'><tt>ippTimeToDate()</tt></a> </li> | |
441 | <li><a href='#ippWrite'><tt>ippWrite()</tt></a> </li> | |
442 | <li><a href='#ippWriteFile'><tt>ippWriteFile()</tt></a> <span class='info'> CUPS 1.1.19 </span></li> | |
443 | <li><a href='#ippWriteIO'><tt>ippWriteIO()</tt></a> <span class='info'> CUPS 1.2 </span></li> | |
444 | </ul> | |
ef416fc2 | 445 | <!-- NEW PAGE --> |
ecdc0628 | 446 | <h3 class='title'><span class='info'> CUPS 1.1.20 </span><a name='cupsDoAuthentication'>cupsDoAuthentication()</a></h3> |
ef416fc2 | 447 | <h4>Description</h4> |
ecdc0628 | 448 | <p>Authenticate a request. |
449 | ||
450 | This function should be called in response to a HTTP_UNAUTHORIZED | |
451 | status, prior to resubmitting your request. | |
ef416fc2 | 452 | |
453 | </p> | |
454 | <h4>Syntax</h4> | |
455 | <pre> | |
456 | int | |
ecdc0628 | 457 | cupsDoAuthentication( |
ef416fc2 | 458 | <a href='#http_t'>http_t</a> * http, |
ecdc0628 | 459 | const char * method, |
460 | const char * resource); | |
ef416fc2 | 461 | </pre> |
462 | <h4>Arguments</h4> | |
463 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
464 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
465 | <tbody> | |
ecdc0628 | 466 | <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr> |
467 | <tr><td><tt>method</tt></td><td>Request method (GET, POST, PUT)</td></tr> | |
468 | <tr><td><tt>resource</tt></td><td>Resource path</td></tr> | |
ef416fc2 | 469 | </tbody></table></div> |
470 | <h4>Returns</h4> | |
ecdc0628 | 471 | <p>0 on success, -1 on error</p> |
ef416fc2 | 472 | <!-- NEW PAGE --> |
ecdc0628 | 473 | <h3 class='title'><a name='cupsDoFileRequest'>cupsDoFileRequest()</a></h3> |
ef416fc2 | 474 | <h4>Description</h4> |
ecdc0628 | 475 | <p>Do an IPP request with a file. |
ef416fc2 | 476 | |
ecdc0628 | 477 | This function sends the IPP request to the specified server, retrying |
478 | and authenticating as necessary. The request is freed with ippDelete() | |
479 | after receiving a valid IPP response.</p> | |
ef416fc2 | 480 | <h4>Syntax</h4> |
481 | <pre> | |
ecdc0628 | 482 | <a href='#ipp_t'>ipp_t</a> * |
483 | cupsDoFileRequest( | |
ef416fc2 | 484 | <a href='#http_t'>http_t</a> * http, |
ecdc0628 | 485 | <a href='#ipp_t'>ipp_t</a> * request, |
486 | const char * resource, | |
487 | const char * filename); | |
ef416fc2 | 488 | </pre> |
489 | <h4>Arguments</h4> | |
490 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
491 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
492 | <tbody> | |
493 | <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr> | |
ecdc0628 | 494 | <tr><td><tt>request</tt></td><td>IPP request</td></tr> |
495 | <tr><td><tt>resource</tt></td><td>HTTP resource for POST</td></tr> | |
496 | <tr><td><tt>filename</tt></td><td>File to send or NULL for none</td></tr> | |
ef416fc2 | 497 | </tbody></table></div> |
498 | <h4>Returns</h4> | |
ecdc0628 | 499 | <p>Response data</p> |
ef416fc2 | 500 | <!-- NEW PAGE --> |
ecdc0628 | 501 | <h3 class='title'><a name='cupsDoRequest'>cupsDoRequest()</a></h3> |
ef416fc2 | 502 | <h4>Description</h4> |
ecdc0628 | 503 | <p>Do an IPP request. |
ef416fc2 | 504 | |
ecdc0628 | 505 | This function sends the IPP request to the specified server, retrying |
506 | and authenticating as necessary. The request is freed with ippDelete() | |
507 | after receiving a valid IPP response.</p> | |
ef416fc2 | 508 | <h4>Syntax</h4> |
509 | <pre> | |
ecdc0628 | 510 | <a href='#ipp_t'>ipp_t</a> * |
511 | cupsDoRequest( | |
ef416fc2 | 512 | <a href='#http_t'>http_t</a> * http, |
ecdc0628 | 513 | <a href='#ipp_t'>ipp_t</a> * request, |
514 | const char * resource); | |
ef416fc2 | 515 | </pre> |
516 | <h4>Arguments</h4> | |
517 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
518 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
519 | <tbody> | |
520 | <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr> | |
ecdc0628 | 521 | <tr><td><tt>request</tt></td><td>IPP request</td></tr> |
522 | <tr><td><tt>resource</tt></td><td>HTTP resource for POST</td></tr> | |
ef416fc2 | 523 | </tbody></table></div> |
524 | <h4>Returns</h4> | |
ecdc0628 | 525 | <p>Response data</p> |
ef416fc2 | 526 | <!-- NEW PAGE --> |
ecdc0628 | 527 | <h3 class='title'><a name='cupsEncodeOptions'>cupsEncodeOptions()</a></h3> |
ef416fc2 | 528 | <h4>Description</h4> |
ecdc0628 | 529 | <p>Encode printer options into IPP attributes. |
ef416fc2 | 530 | |
ecdc0628 | 531 | This function adds operation, job, and then subscription attributes, |
532 | in that order. Use the cupsEncodeOptions2() function to add attributes | |
533 | for a single group.</p> | |
ef416fc2 | 534 | <h4>Syntax</h4> |
535 | <pre> | |
536 | void | |
ecdc0628 | 537 | cupsEncodeOptions( |
538 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
539 | int num_options, | |
540 | cups_option_t * options); | |
ef416fc2 | 541 | </pre> |
542 | <h4>Arguments</h4> | |
543 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
544 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
545 | <tbody> | |
ecdc0628 | 546 | <tr><td><tt>ipp</tt></td><td>Request to add to</td></tr> |
547 | <tr><td><tt>num_options</tt></td><td>Number of options</td></tr> | |
548 | <tr><td><tt>options</tt></td><td>Options</td></tr> | |
ef416fc2 | 549 | </tbody></table></div> |
550 | <h4>Returns</h4> | |
551 | <p>Nothing.</p> | |
552 | <!-- NEW PAGE --> | |
ecdc0628 | 553 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cupsEncodeOptions2'>cupsEncodeOptions2()</a></h3> |
ef416fc2 | 554 | <h4>Description</h4> |
ecdc0628 | 555 | <p>Encode printer options into IPP attributes for a group. |
ef416fc2 | 556 | |
ecdc0628 | 557 | This function only adds attributes for a single group. Call this |
558 | function multiple times for each group, or use cupsEncodeOptions() | |
559 | to add the standard groups. | |
ef416fc2 | 560 | |
561 | </p> | |
562 | <h4>Syntax</h4> | |
563 | <pre> | |
ef416fc2 | 564 | void |
ecdc0628 | 565 | cupsEncodeOptions2( |
566 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
567 | int num_options, | |
568 | cups_option_t * options, | |
569 | ipp_tag_t group_tag); | |
ef416fc2 | 570 | </pre> |
571 | <h4>Arguments</h4> | |
572 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
573 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
574 | <tbody> | |
ecdc0628 | 575 | <tr><td><tt>ipp</tt></td><td>Request to add to</td></tr> |
576 | <tr><td><tt>num_options</tt></td><td>Number of options</td></tr> | |
577 | <tr><td><tt>options</tt></td><td>Options</td></tr> | |
578 | <tr><td><tt>group_tag</tt></td><td>Group to encode</td></tr> | |
ef416fc2 | 579 | </tbody></table></div> |
580 | <h4>Returns</h4> | |
581 | <p>Nothing.</p> | |
582 | <!-- NEW PAGE --> | |
ef416fc2 | 583 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrAny'>httpAddrAny()</a></h3> |
584 | <h4>Description</h4> | |
585 | <p>Check for the "any" address. | |
586 | ||
587 | </p> | |
588 | <h4>Syntax</h4> | |
589 | <pre> | |
590 | int | |
591 | httpAddrAny( | |
592 | const <a href='#http_addr_t'>http_addr_t</a> * addr); | |
593 | </pre> | |
594 | <h4>Arguments</h4> | |
595 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
596 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
597 | <tbody> | |
598 | <tr><td><tt>addr</tt></td><td>Address to check</td></tr> | |
599 | </tbody></table></div> | |
600 | <h4>Returns</h4> | |
601 | <p>1 if "any", 0 otherwise</p> | |
602 | <!-- NEW PAGE --> | |
603 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrEqual'>httpAddrEqual()</a></h3> | |
604 | <h4>Description</h4> | |
605 | <p>Compare two addresses. | |
606 | ||
607 | </p> | |
608 | <h4>Syntax</h4> | |
609 | <pre> | |
610 | int | |
611 | httpAddrEqual( | |
612 | const <a href='#http_addr_t'>http_addr_t</a> * addr1, | |
613 | const <a href='#http_addr_t'>http_addr_t</a> * addr2); | |
614 | </pre> | |
615 | <h4>Arguments</h4> | |
616 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
617 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
618 | <tbody> | |
619 | <tr><td><tt>addr1</tt></td><td>First address</td></tr> | |
620 | <tr><td><tt>addr2</tt></td><td>Second address</td></tr> | |
621 | </tbody></table></div> | |
622 | <h4>Returns</h4> | |
ecdc0628 | 623 | <p>1 if equal, 0 if not</p> |
ef416fc2 | 624 | <!-- NEW PAGE --> |
625 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrLength'>httpAddrLength()</a></h3> | |
626 | <h4>Description</h4> | |
627 | <p>Return the length of the address in bytes. | |
628 | ||
629 | </p> | |
630 | <h4>Syntax</h4> | |
631 | <pre> | |
632 | int | |
633 | httpAddrLength( | |
634 | const <a href='#http_addr_t'>http_addr_t</a> * addr); | |
635 | </pre> | |
636 | <h4>Arguments</h4> | |
637 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
638 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
639 | <tbody> | |
640 | <tr><td><tt>addr</tt></td><td>Address</td></tr> | |
641 | </tbody></table></div> | |
642 | <h4>Returns</h4> | |
643 | <p>Length in bytes</p> | |
644 | <!-- NEW PAGE --> | |
645 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrLocalhost'>httpAddrLocalhost()</a></h3> | |
646 | <h4>Description</h4> | |
647 | <p>Check for the local loopback address. | |
648 | ||
649 | </p> | |
650 | <h4>Syntax</h4> | |
651 | <pre> | |
652 | int | |
653 | httpAddrLocalhost( | |
654 | const <a href='#http_addr_t'>http_addr_t</a> * addr); | |
655 | </pre> | |
656 | <h4>Arguments</h4> | |
657 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
658 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
659 | <tbody> | |
660 | <tr><td><tt>addr</tt></td><td>Address to check</td></tr> | |
661 | </tbody></table></div> | |
662 | <h4>Returns</h4> | |
663 | <p>1 if local host, 0 otherwise</p> | |
664 | <!-- NEW PAGE --> | |
665 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrLookup'>httpAddrLookup()</a></h3> | |
666 | <h4>Description</h4> | |
667 | <p>Lookup the hostname associated with the address. | |
668 | ||
669 | </p> | |
670 | <h4>Syntax</h4> | |
671 | <pre> | |
ecdc0628 | 672 | char * |
ef416fc2 | 673 | httpAddrLookup( |
674 | const <a href='#http_addr_t'>http_addr_t</a> * addr, | |
ecdc0628 | 675 | char * name, |
ef416fc2 | 676 | int namelen); |
677 | </pre> | |
678 | <h4>Arguments</h4> | |
679 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
680 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
681 | <tbody> | |
682 | <tr><td><tt>addr</tt></td><td>Address to lookup</td></tr> | |
683 | <tr><td><tt>name</tt></td><td>Host name buffer</td></tr> | |
684 | <tr><td><tt>namelen</tt></td><td>Size of name buffer</td></tr> | |
685 | </tbody></table></div> | |
686 | <h4>Returns</h4> | |
687 | <p>Host name</p> | |
688 | <!-- NEW PAGE --> | |
689 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrString'>httpAddrString()</a></h3> | |
690 | <h4>Description</h4> | |
ecdc0628 | 691 | <p>Convert an address to a numeric string. |
ef416fc2 | 692 | |
693 | </p> | |
694 | <h4>Syntax</h4> | |
695 | <pre> | |
ecdc0628 | 696 | char * |
ef416fc2 | 697 | httpAddrString( |
698 | const <a href='#http_addr_t'>http_addr_t</a> * addr, | |
ecdc0628 | 699 | char * s, |
ef416fc2 | 700 | int slen); |
701 | </pre> | |
702 | <h4>Arguments</h4> | |
703 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
704 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
705 | <tbody> | |
706 | <tr><td><tt>addr</tt></td><td>Address to convert</td></tr> | |
707 | <tr><td><tt>s</tt></td><td>String buffer</td></tr> | |
708 | <tr><td><tt>slen</tt></td><td>Length of string</td></tr> | |
709 | </tbody></table></div> | |
710 | <h4>Returns</h4> | |
ecdc0628 | 711 | <p>Numeric address string</p> |
ef416fc2 | 712 | <!-- NEW PAGE --> |
713 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAssembleURI'>httpAssembleURI()</a></h3> | |
714 | <h4>Description</h4> | |
715 | <p>Assemble a uniform resource identifier from its | |
716 | components. | |
717 | ||
ecdc0628 | 718 | This function escapes reserved characters in the URI depending on the |
719 | value of the "encoding" argument. You should use this function in | |
720 | place of traditional string functions whenever you need to create a | |
721 | URI string. | |
ef416fc2 | 722 | |
723 | </p> | |
724 | <h4>Syntax</h4> | |
725 | <pre> | |
726 | http_uri_status_t | |
727 | httpAssembleURI( | |
ecdc0628 | 728 | http_uri_coding_t encoding, |
729 | char * uri, | |
ef416fc2 | 730 | int urilen, |
ecdc0628 | 731 | const char * scheme, |
732 | const char * username, | |
733 | const char * host, | |
ef416fc2 | 734 | int port, |
ecdc0628 | 735 | const char * resource); |
ef416fc2 | 736 | </pre> |
737 | <h4>Arguments</h4> | |
738 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
739 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
740 | <tbody> | |
ecdc0628 | 741 | <tr><td><tt>encoding</tt></td><td>Encoding flags</td></tr> |
ef416fc2 | 742 | <tr><td><tt>uri</tt></td><td>URI buffer</td></tr> |
743 | <tr><td><tt>urilen</tt></td><td>Size of URI buffer</td></tr> | |
744 | <tr><td><tt>scheme</tt></td><td>Scheme name</td></tr> | |
745 | <tr><td><tt>username</tt></td><td>Username</td></tr> | |
746 | <tr><td><tt>host</tt></td><td>Hostname or address</td></tr> | |
747 | <tr><td><tt>port</tt></td><td>Port number</td></tr> | |
748 | <tr><td><tt>resource</tt></td><td>Resource</td></tr> | |
749 | </tbody></table></div> | |
750 | <h4>Returns</h4> | |
751 | <p>URI status</p> | |
752 | <!-- NEW PAGE --> | |
753 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAssembleURIf'>httpAssembleURIf()</a></h3> | |
754 | <h4>Description</h4> | |
755 | <p>Assemble a uniform resource identifier from its | |
756 | components with a formatted resource. | |
757 | ||
758 | This function creates a formatted version of the resource string | |
ecdc0628 | 759 | argument "resourcef" and escapes reserved characters in the URI |
760 | depending on the value of the "encoding" argument. You should use | |
761 | this function in place of traditional string functions whenever | |
762 | you need to create a URI string. | |
ef416fc2 | 763 | |
764 | </p> | |
765 | <h4>Syntax</h4> | |
766 | <pre> | |
767 | http_uri_status_t | |
768 | httpAssembleURIf( | |
ecdc0628 | 769 | http_uri_coding_t encoding, |
770 | char * uri, | |
ef416fc2 | 771 | int urilen, |
ecdc0628 | 772 | const char * scheme, |
773 | const char * username, | |
774 | const char * host, | |
ef416fc2 | 775 | int port, |
ecdc0628 | 776 | const char * resourcef, |
ef416fc2 | 777 | ...); |
778 | </pre> | |
779 | <h4>Arguments</h4> | |
780 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
781 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
782 | <tbody> | |
ecdc0628 | 783 | <tr><td><tt>encoding</tt></td><td>Encoding flags</td></tr> |
ef416fc2 | 784 | <tr><td><tt>uri</tt></td><td>URI buffer</td></tr> |
785 | <tr><td><tt>urilen</tt></td><td>Size of URI buffer</td></tr> | |
786 | <tr><td><tt>scheme</tt></td><td>Scheme name</td></tr> | |
787 | <tr><td><tt>username</tt></td><td>Username</td></tr> | |
788 | <tr><td><tt>host</tt></td><td>Hostname or address</td></tr> | |
789 | <tr><td><tt>port</tt></td><td>Port number</td></tr> | |
790 | <tr><td><tt>resourcef</tt></td><td>Printf-style resource</td></tr> | |
791 | <tr><td><tt>...</tt></td><td>Additional arguments as needed</td></tr> | |
792 | </tbody></table></div> | |
793 | <h4>Returns</h4> | |
794 | <p>URI status</p> | |
795 | <!-- NEW PAGE --> | |
ecdc0628 | 796 | <h3 class='title'><a name='httpBlocking'>httpBlocking()</a></h3> |
797 | <h4>Description</h4> | |
798 | <p>Set blocking/non-blocking behavior on a connection.</p> | |
799 | <h4>Syntax</h4> | |
800 | <pre> | |
801 | void | |
802 | httpBlocking( | |
803 | <a href='#http_t'>http_t</a> * http, | |
804 | int b); | |
805 | </pre> | |
806 | <h4>Arguments</h4> | |
807 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
808 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
809 | <tbody> | |
810 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
811 | <tr><td><tt>b</tt></td><td>1 = blocking, 0 = non-blocking</td></tr> | |
812 | </tbody></table></div> | |
813 | <h4>Returns</h4> | |
814 | <p>Nothing.</p> | |
815 | <!-- NEW PAGE --> | |
ef416fc2 | 816 | <h3 class='title'><a name='httpCheck'>httpCheck()</a></h3> |
817 | <h4>Description</h4> | |
818 | <p>Check to see if there is a pending response from the server.</p> | |
819 | <h4>Syntax</h4> | |
820 | <pre> | |
821 | int | |
822 | httpCheck( | |
823 | <a href='#http_t'>http_t</a> * http); | |
824 | </pre> | |
825 | <h4>Arguments</h4> | |
826 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
827 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
828 | <tbody> | |
829 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
830 | </tbody></table></div> | |
831 | <h4>Returns</h4> | |
832 | <p>0 = no data, 1 = data available</p> | |
833 | <!-- NEW PAGE --> | |
834 | <h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='httpClearCookie'>httpClearCookie()</a></h3> | |
835 | <h4>Description</h4> | |
836 | <p>Clear the cookie value(s). | |
837 | ||
838 | </p> | |
839 | <h4>Syntax</h4> | |
840 | <pre> | |
841 | void | |
842 | httpClearCookie( | |
843 | <a href='#http_t'>http_t</a> * http); | |
844 | </pre> | |
845 | <h4>Arguments</h4> | |
846 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
847 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
848 | <tbody> | |
ecdc0628 | 849 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
850 | </tbody></table></div> | |
851 | <h4>Returns</h4> | |
852 | <p>Nothing.</p> | |
853 | <!-- NEW PAGE --> | |
854 | <h3 class='title'><a name='httpClearFields'>httpClearFields()</a></h3> | |
855 | <h4>Description</h4> | |
856 | <p>Clear HTTP request fields.</p> | |
857 | <h4>Syntax</h4> | |
858 | <pre> | |
859 | void | |
860 | httpClearFields( | |
861 | <a href='#http_t'>http_t</a> * http); | |
862 | </pre> | |
863 | <h4>Arguments</h4> | |
864 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
865 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
866 | <tbody> | |
867 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
ef416fc2 | 868 | </tbody></table></div> |
869 | <h4>Returns</h4> | |
870 | <p>Nothing.</p> | |
871 | <!-- NEW PAGE --> | |
872 | <h3 class='title'><a name='httpClose'>httpClose()</a></h3> | |
873 | <h4>Description</h4> | |
874 | <p>Close an HTTP connection...</p> | |
875 | <h4>Syntax</h4> | |
876 | <pre> | |
877 | void | |
878 | httpClose( | |
879 | <a href='#http_t'>http_t</a> * http); | |
880 | </pre> | |
881 | <h4>Arguments</h4> | |
882 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
883 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
884 | <tbody> | |
ecdc0628 | 885 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 886 | </tbody></table></div> |
887 | <h4>Returns</h4> | |
888 | <p>Nothing.</p> | |
889 | <!-- NEW PAGE --> | |
890 | <h3 class='title'><a name='httpConnect'>httpConnect()</a></h3> | |
891 | <h4>Description</h4> | |
892 | <p>Connect to a HTTP server.</p> | |
893 | <h4>Syntax</h4> | |
894 | <pre> | |
895 | <a href='#http_t'>http_t</a> * | |
896 | httpConnect( | |
ecdc0628 | 897 | const char * host, |
ef416fc2 | 898 | int port); |
899 | </pre> | |
900 | <h4>Arguments</h4> | |
901 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
902 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
903 | <tbody> | |
904 | <tr><td><tt>host</tt></td><td>Host to connect to</td></tr> | |
905 | <tr><td><tt>port</tt></td><td>Port number</td></tr> | |
906 | </tbody></table></div> | |
907 | <h4>Returns</h4> | |
908 | <p>New HTTP connection</p> | |
909 | <!-- NEW PAGE --> | |
910 | <h3 class='title'><a name='httpConnectEncrypt'>httpConnectEncrypt()</a></h3> | |
911 | <h4>Description</h4> | |
912 | <p>Connect to a HTTP server using encryption.</p> | |
913 | <h4>Syntax</h4> | |
914 | <pre> | |
915 | <a href='#http_t'>http_t</a> * | |
916 | httpConnectEncrypt( | |
ecdc0628 | 917 | const char * host, |
ef416fc2 | 918 | int port, |
919 | <a href='#http_encryption_t'>http_encryption_t</a> encryption); | |
920 | </pre> | |
921 | <h4>Arguments</h4> | |
922 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
923 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
924 | <tbody> | |
925 | <tr><td><tt>host</tt></td><td>Host to connect to</td></tr> | |
926 | <tr><td><tt>port</tt></td><td>Port number</td></tr> | |
927 | <tr><td><tt>encryption</tt></td><td>Type of encryption to use</td></tr> | |
928 | </tbody></table></div> | |
929 | <h4>Returns</h4> | |
930 | <p>New HTTP connection</p> | |
931 | <!-- NEW PAGE --> | |
ecdc0628 | 932 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpDecode64'>httpDecode64()</a></h3> |
ef416fc2 | 933 | <h4>Description</h4> |
ecdc0628 | 934 | <p>Base64-decode a string. |
935 | ||
936 | This function is deprecated. Use the httpDecode64_2() function instead | |
937 | which provides buffer length arguments. | |
938 | ||
939 | </p> | |
ef416fc2 | 940 | <h4>Syntax</h4> |
941 | <pre> | |
ecdc0628 | 942 | char * |
ef416fc2 | 943 | httpDecode64( |
ecdc0628 | 944 | char * out, |
945 | const char * in); | |
ef416fc2 | 946 | </pre> |
947 | <h4>Arguments</h4> | |
948 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
949 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
950 | <tbody> | |
951 | <tr><td><tt>out</tt></td><td>String to write to</td></tr> | |
952 | <tr><td><tt>in</tt></td><td>String to read from</td></tr> | |
953 | </tbody></table></div> | |
954 | <h4>Returns</h4> | |
955 | <p>Decoded string</p> | |
956 | <!-- NEW PAGE --> | |
957 | <h3 class='title'><span class='info'> CUPS 1.1.21 </span><a name='httpDecode64_2'>httpDecode64_2()</a></h3> | |
958 | <h4>Description</h4> | |
959 | <p>Base64-decode a string. | |
960 | ||
961 | </p> | |
962 | <h4>Syntax</h4> | |
963 | <pre> | |
ecdc0628 | 964 | char * |
ef416fc2 | 965 | httpDecode64_2( |
ecdc0628 | 966 | char * out, |
ef416fc2 | 967 | int * outlen, |
ecdc0628 | 968 | const char * in); |
ef416fc2 | 969 | </pre> |
970 | <h4>Arguments</h4> | |
971 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
972 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
973 | <tbody> | |
974 | <tr><td><tt>out</tt></td><td>String to write to</td></tr> | |
975 | <tr><td><tt>outlen</tt></td><td>Size of output string</td></tr> | |
976 | <tr><td><tt>in</tt></td><td>String to read from</td></tr> | |
977 | </tbody></table></div> | |
978 | <h4>Returns</h4> | |
979 | <p>Decoded string</p> | |
980 | <!-- NEW PAGE --> | |
981 | <h3 class='title'><a name='httpDelete'>httpDelete()</a></h3> | |
982 | <h4>Description</h4> | |
983 | <p>Send a DELETE request to the server.</p> | |
984 | <h4>Syntax</h4> | |
985 | <pre> | |
986 | int | |
987 | httpDelete( | |
988 | <a href='#http_t'>http_t</a> * http, | |
ecdc0628 | 989 | const char * uri); |
ef416fc2 | 990 | </pre> |
991 | <h4>Arguments</h4> | |
992 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
993 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
994 | <tbody> | |
ecdc0628 | 995 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 996 | <tr><td><tt>uri</tt></td><td>URI to delete</td></tr> |
997 | </tbody></table></div> | |
998 | <h4>Returns</h4> | |
999 | <p>Status of call (0 = success)</p> | |
1000 | <!-- NEW PAGE --> | |
ecdc0628 | 1001 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpEncode64'>httpEncode64()</a></h3> |
ef416fc2 | 1002 | <h4>Description</h4> |
ecdc0628 | 1003 | <p>Base64-encode a string. |
1004 | ||
1005 | This function is deprecated. Use the httpEncode64_2() function instead | |
1006 | which provides buffer length arguments. | |
1007 | ||
1008 | </p> | |
ef416fc2 | 1009 | <h4>Syntax</h4> |
1010 | <pre> | |
ecdc0628 | 1011 | char * |
ef416fc2 | 1012 | httpEncode64( |
ecdc0628 | 1013 | char * out, |
1014 | const char * in); | |
ef416fc2 | 1015 | </pre> |
1016 | <h4>Arguments</h4> | |
1017 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1018 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1019 | <tbody> | |
1020 | <tr><td><tt>out</tt></td><td>String to write to</td></tr> | |
1021 | <tr><td><tt>in</tt></td><td>String to read from</td></tr> | |
1022 | </tbody></table></div> | |
1023 | <h4>Returns</h4> | |
1024 | <p>Encoded string</p> | |
1025 | <!-- NEW PAGE --> | |
1026 | <h3 class='title'><span class='info'> CUPS 1.1.21 </span><a name='httpEncode64_2'>httpEncode64_2()</a></h3> | |
1027 | <h4>Description</h4> | |
1028 | <p>Base64-encode a string. | |
1029 | ||
1030 | </p> | |
1031 | <h4>Syntax</h4> | |
1032 | <pre> | |
ecdc0628 | 1033 | char * |
ef416fc2 | 1034 | httpEncode64_2( |
ecdc0628 | 1035 | char * out, |
ef416fc2 | 1036 | int outlen, |
ecdc0628 | 1037 | const char * in, |
ef416fc2 | 1038 | int inlen); |
1039 | </pre> | |
1040 | <h4>Arguments</h4> | |
1041 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1042 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1043 | <tbody> | |
1044 | <tr><td><tt>out</tt></td><td>String to write to</td></tr> | |
1045 | <tr><td><tt>outlen</tt></td><td>Size of output string</td></tr> | |
1046 | <tr><td><tt>in</tt></td><td>String to read from</td></tr> | |
1047 | <tr><td><tt>inlen</tt></td><td>Size of input string</td></tr> | |
1048 | </tbody></table></div> | |
1049 | <h4>Returns</h4> | |
1050 | <p>Encoded string</p> | |
1051 | <!-- NEW PAGE --> | |
1052 | <h3 class='title'><a name='httpEncryption'>httpEncryption()</a></h3> | |
1053 | <h4>Description</h4> | |
1054 | <p>Set the required encryption on the link.</p> | |
1055 | <h4>Syntax</h4> | |
1056 | <pre> | |
1057 | int | |
1058 | httpEncryption( | |
1059 | <a href='#http_t'>http_t</a> * http, | |
1060 | <a href='#http_encryption_t'>http_encryption_t</a> e); | |
1061 | </pre> | |
1062 | <h4>Arguments</h4> | |
1063 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1064 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1065 | <tbody> | |
ecdc0628 | 1066 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1067 | <tr><td><tt>e</tt></td><td>New encryption preference</td></tr> |
1068 | </tbody></table></div> | |
1069 | <h4>Returns</h4> | |
1070 | <p>-1 on error, 0 on success</p> | |
1071 | <!-- NEW PAGE --> | |
ecdc0628 | 1072 | <h3 class='title'><a name='httpError'>httpError()</a></h3> |
1073 | <h4>Description</h4> | |
1074 | <p>Get the last error on a connection.</p> | |
1075 | <h4>Syntax</h4> | |
1076 | <pre> | |
1077 | int | |
1078 | httpError( | |
1079 | <a href='#http_t'>http_t</a> * http); | |
1080 | </pre> | |
1081 | <h4>Arguments</h4> | |
1082 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1083 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1084 | <tbody> | |
1085 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
1086 | </tbody></table></div> | |
1087 | <h4>Returns</h4> | |
1088 | <p>Error code (errno) value</p> | |
1089 | <!-- NEW PAGE --> | |
ef416fc2 | 1090 | <h3 class='title'><a name='httpFlush'>httpFlush()</a></h3> |
1091 | <h4>Description</h4> | |
1092 | <p>Flush data from a HTTP connection.</p> | |
1093 | <h4>Syntax</h4> | |
1094 | <pre> | |
1095 | void | |
1096 | httpFlush( | |
1097 | <a href='#http_t'>http_t</a> * http); | |
1098 | </pre> | |
1099 | <h4>Arguments</h4> | |
1100 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1101 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1102 | <tbody> | |
ecdc0628 | 1103 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1104 | </tbody></table></div> |
1105 | <h4>Returns</h4> | |
1106 | <p>Nothing.</p> | |
1107 | <!-- NEW PAGE --> | |
1108 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpFlushWrite'>httpFlushWrite()</a></h3> | |
1109 | <h4>Description</h4> | |
1110 | <p>Flush data in write buffer. | |
1111 | ||
1112 | </p> | |
1113 | <h4>Syntax</h4> | |
1114 | <pre> | |
1115 | int | |
1116 | httpFlushWrite( | |
1117 | <a href='#http_t'>http_t</a> * http); | |
1118 | </pre> | |
1119 | <h4>Arguments</h4> | |
1120 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1121 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1122 | <tbody> | |
ecdc0628 | 1123 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
1124 | </tbody></table></div> | |
1125 | <h4>Returns</h4> | |
1126 | <p>Bytes written or -1 on error</p> | |
1127 | <!-- NEW PAGE --> | |
1128 | <h3 class='title'><a name='httpGet'>httpGet()</a></h3> | |
1129 | <h4>Description</h4> | |
1130 | <p>Send a GET request to the server.</p> | |
1131 | <h4>Syntax</h4> | |
1132 | <pre> | |
1133 | int | |
1134 | httpGet( | |
1135 | <a href='#http_t'>http_t</a> * http, | |
1136 | const char * uri); | |
1137 | </pre> | |
1138 | <h4>Arguments</h4> | |
1139 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1140 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1141 | <tbody> | |
1142 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
1143 | <tr><td><tt>uri</tt></td><td>URI to get</td></tr> | |
1144 | </tbody></table></div> | |
1145 | <h4>Returns</h4> | |
1146 | <p>Status of call (0 = success)</p> | |
1147 | <!-- NEW PAGE --> | |
1148 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetBlocking'>httpGetBlocking()</a></h3> | |
1149 | <h4>Description</h4> | |
1150 | <p>Get the blocking/non-block state of a connection. | |
1151 | ||
1152 | </p> | |
1153 | <h4>Syntax</h4> | |
1154 | <pre> | |
1155 | int | |
1156 | httpGetBlocking( | |
1157 | <a href='#http_t'>http_t</a> * http); | |
1158 | </pre> | |
1159 | <h4>Arguments</h4> | |
1160 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1161 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1162 | <tbody> | |
1163 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
ef416fc2 | 1164 | </tbody></table></div> |
1165 | <h4>Returns</h4> | |
ecdc0628 | 1166 | <p>1 if blocking, 0 if non-blocking</p> |
ef416fc2 | 1167 | <!-- NEW PAGE --> |
ecdc0628 | 1168 | <h3 class='title'><a name='httpGetCookie'>httpGetCookie()</a></h3> |
ef416fc2 | 1169 | <h4>Description</h4> |
ecdc0628 | 1170 | <p>Get any cookie data from the response.</p> |
ef416fc2 | 1171 | <h4>Syntax</h4> |
1172 | <pre> | |
ecdc0628 | 1173 | const char * |
1174 | httpGetCookie( | |
1175 | <a href='#http_t'>http_t</a> * http); | |
ef416fc2 | 1176 | </pre> |
1177 | <h4>Arguments</h4> | |
1178 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1179 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1180 | <tbody> | |
ecdc0628 | 1181 | <tr><td><tt>http</tt></td><td>HTTP connecion</td></tr> |
ef416fc2 | 1182 | </tbody></table></div> |
1183 | <h4>Returns</h4> | |
ecdc0628 | 1184 | <p>Cookie data or NULL</p> |
ef416fc2 | 1185 | <!-- NEW PAGE --> |
1186 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpGetDateString'>httpGetDateString()</a></h3> | |
1187 | <h4>Description</h4> | |
1188 | <p>Get a formatted date/time string from a time value. | |
1189 | ||
1190 | </p> | |
1191 | <h4>Syntax</h4> | |
1192 | <pre> | |
ecdc0628 | 1193 | const char * |
ef416fc2 | 1194 | httpGetDateString( |
1195 | time_t t); | |
1196 | </pre> | |
1197 | <h4>Arguments</h4> | |
1198 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1199 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1200 | <tbody> | |
1201 | <tr><td><tt>t</tt></td><td>UNIX time</td></tr> | |
1202 | </tbody></table></div> | |
1203 | <h4>Returns</h4> | |
1204 | <p>Date/time string</p> | |
1205 | <!-- NEW PAGE --> | |
1206 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetDateString2'>httpGetDateString2()</a></h3> | |
1207 | <h4>Description</h4> | |
1208 | <p>Get a formatted date/time string from a time value. | |
1209 | ||
1210 | </p> | |
1211 | <h4>Syntax</h4> | |
1212 | <pre> | |
ecdc0628 | 1213 | const char * |
ef416fc2 | 1214 | httpGetDateString2( |
1215 | time_t t, | |
ecdc0628 | 1216 | char * s, |
ef416fc2 | 1217 | int slen); |
1218 | </pre> | |
1219 | <h4>Arguments</h4> | |
1220 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1221 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1222 | <tbody> | |
1223 | <tr><td><tt>t</tt></td><td>UNIX time</td></tr> | |
1224 | <tr><td><tt>s</tt></td><td>String buffer</td></tr> | |
1225 | <tr><td><tt>slen</tt></td><td>Size of string buffer</td></tr> | |
1226 | </tbody></table></div> | |
1227 | <h4>Returns</h4> | |
1228 | <p>Date/time string</p> | |
1229 | <!-- NEW PAGE --> | |
1230 | <h3 class='title'><a name='httpGetDateTime'>httpGetDateTime()</a></h3> | |
1231 | <h4>Description</h4> | |
1232 | <p>Get a time value from a formatted date/time string.</p> | |
1233 | <h4>Syntax</h4> | |
1234 | <pre> | |
1235 | time_t | |
1236 | httpGetDateTime( | |
ecdc0628 | 1237 | const char * s); |
ef416fc2 | 1238 | </pre> |
1239 | <h4>Arguments</h4> | |
1240 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1241 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1242 | <tbody> | |
1243 | <tr><td><tt>s</tt></td><td>Date/time string</td></tr> | |
1244 | </tbody></table></div> | |
1245 | <h4>Returns</h4> | |
1246 | <p>UNIX time</p> | |
1247 | <!-- NEW PAGE --> | |
ecdc0628 | 1248 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetFd'>httpGetFd()</a></h3> |
1249 | <h4>Description</h4> | |
1250 | <p>Get the file descriptor associated with a connection. | |
1251 | ||
1252 | </p> | |
1253 | <h4>Syntax</h4> | |
1254 | <pre> | |
1255 | int | |
1256 | httpGetFd( | |
1257 | <a href='#http_t'>http_t</a> * http); | |
1258 | </pre> | |
1259 | <h4>Arguments</h4> | |
1260 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1261 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1262 | <tbody> | |
1263 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
1264 | </tbody></table></div> | |
1265 | <h4>Returns</h4> | |
1266 | <p>File descriptor or -1 if none</p> | |
1267 | <!-- NEW PAGE --> | |
1268 | <h3 class='title'><a name='httpGetField'>httpGetField()</a></h3> | |
1269 | <h4>Description</h4> | |
1270 | <p>Get a field value from a request/response.</p> | |
1271 | <h4>Syntax</h4> | |
1272 | <pre> | |
1273 | const char * | |
1274 | httpGetField( | |
1275 | <a href='#http_t'>http_t</a> * http, | |
1276 | http_field_t field); | |
1277 | </pre> | |
1278 | <h4>Arguments</h4> | |
1279 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1280 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1281 | <tbody> | |
1282 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
1283 | <tr><td><tt>field</tt></td><td>Field to get</td></tr> | |
1284 | </tbody></table></div> | |
1285 | <h4>Returns</h4> | |
1286 | <p>Field value</p> | |
1287 | <!-- NEW PAGE --> | |
ef416fc2 | 1288 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpGetHostByName'>httpGetHostByName()</a></h3> |
1289 | <h4>Description</h4> | |
1290 | <p>Lookup a hostname or IPv4 address, and return | |
1291 | address records for the specified name. | |
1292 | ||
1293 | </p> | |
1294 | <h4>Syntax</h4> | |
1295 | <pre> | |
1296 | struct hostent * | |
1297 | httpGetHostByName( | |
ecdc0628 | 1298 | const char * name); |
ef416fc2 | 1299 | </pre> |
1300 | <h4>Arguments</h4> | |
1301 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1302 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1303 | <tbody> | |
1304 | <tr><td><tt>name</tt></td><td>Hostname or IP address</td></tr> | |
1305 | </tbody></table></div> | |
1306 | <h4>Returns</h4> | |
1307 | <p>Host entry</p> | |
1308 | <!-- NEW PAGE --> | |
1309 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetHostname'>httpGetHostname()</a></h3> | |
1310 | <h4>Description</h4> | |
1311 | <p>Get the FQDN for the local system. | |
1312 | ||
1313 | This function uses both gethostname() and gethostbyname() to | |
1314 | get the local hostname with domain. | |
1315 | ||
1316 | </p> | |
1317 | <h4>Syntax</h4> | |
1318 | <pre> | |
ecdc0628 | 1319 | const char * |
ef416fc2 | 1320 | httpGetHostname( |
ecdc0628 | 1321 | char * s, |
ef416fc2 | 1322 | int slen); |
1323 | </pre> | |
1324 | <h4>Arguments</h4> | |
1325 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1326 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1327 | <tbody> | |
1328 | <tr><td><tt>s</tt></td><td>String buffer for name</td></tr> | |
1329 | <tr><td><tt>slen</tt></td><td>Size of buffer</td></tr> | |
1330 | </tbody></table></div> | |
1331 | <h4>Returns</h4> | |
1332 | <p>FQDN for this system</p> | |
1333 | <!-- NEW PAGE --> | |
ecdc0628 | 1334 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpGetLength'>httpGetLength()</a></h3> |
ef416fc2 | 1335 | <h4>Description</h4> |
1336 | <p>Get the amount of data remaining from the | |
1337 | content-length or transfer-encoding fields. | |
1338 | ||
1339 | This function is deprecated and will not return lengths larger than | |
1340 | 2^31 - 1; use httpGetLength2() instead. | |
1341 | ||
1342 | </p> | |
1343 | <h4>Syntax</h4> | |
1344 | <pre> | |
1345 | int | |
1346 | httpGetLength( | |
1347 | <a href='#http_t'>http_t</a> * http); | |
1348 | </pre> | |
1349 | <h4>Arguments</h4> | |
1350 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1351 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1352 | <tbody> | |
ecdc0628 | 1353 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1354 | </tbody></table></div> |
1355 | <h4>Returns</h4> | |
1356 | <p>Content length</p> | |
1357 | <!-- NEW PAGE --> | |
ecdc0628 | 1358 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetLength2'>httpGetLength2()</a></h3> |
ef416fc2 | 1359 | <h4>Description</h4> |
1360 | <p>Get the amount of data remaining from the | |
1361 | content-length or transfer-encoding fields. | |
1362 | ||
1363 | This function returns the complete content length, even for | |
ecdc0628 | 1364 | content larger than 2^31 - 1. |
1365 | ||
1366 | </p> | |
ef416fc2 | 1367 | <h4>Syntax</h4> |
1368 | <pre> | |
1369 | off_t | |
1370 | httpGetLength2( | |
1371 | <a href='#http_t'>http_t</a> * http); | |
1372 | </pre> | |
1373 | <h4>Arguments</h4> | |
1374 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1375 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1376 | <tbody> | |
ecdc0628 | 1377 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1378 | </tbody></table></div> |
1379 | <h4>Returns</h4> | |
1380 | <p>Content length</p> | |
1381 | <!-- NEW PAGE --> | |
ecdc0628 | 1382 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetStatus'>httpGetStatus()</a></h3> |
1383 | <h4>Description</h4> | |
1384 | <p>Get the status of the last HTTP request. | |
1385 | ||
1386 | </p> | |
1387 | <h4>Syntax</h4> | |
1388 | <pre> | |
1389 | http_status_t | |
1390 | httpGetStatus( | |
1391 | <a href='#http_t'>http_t</a> * http); | |
1392 | </pre> | |
1393 | <h4>Arguments</h4> | |
1394 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1395 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1396 | <tbody> | |
1397 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
1398 | </tbody></table></div> | |
1399 | <h4>Returns</h4> | |
1400 | <p>HTTP status</p> | |
1401 | <!-- NEW PAGE --> | |
ef416fc2 | 1402 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpGetSubField'>httpGetSubField()</a></h3> |
1403 | <h4>Description</h4> | |
1404 | <p>Get a sub-field value. | |
1405 | ||
1406 | </p> | |
1407 | <h4>Syntax</h4> | |
1408 | <pre> | |
ecdc0628 | 1409 | char * |
ef416fc2 | 1410 | httpGetSubField( |
1411 | <a href='#http_t'>http_t</a> * http, | |
1412 | http_field_t field, | |
ecdc0628 | 1413 | const char * name, |
1414 | char * value); | |
ef416fc2 | 1415 | </pre> |
1416 | <h4>Arguments</h4> | |
1417 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1418 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1419 | <tbody> | |
ecdc0628 | 1420 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1421 | <tr><td><tt>field</tt></td><td>Field index</td></tr> |
1422 | <tr><td><tt>name</tt></td><td>Name of sub-field</td></tr> | |
1423 | <tr><td><tt>value</tt></td><td>Value string</td></tr> | |
1424 | </tbody></table></div> | |
1425 | <h4>Returns</h4> | |
1426 | <p>Value or NULL</p> | |
1427 | <!-- NEW PAGE --> | |
1428 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetSubField2'>httpGetSubField2()</a></h3> | |
1429 | <h4>Description</h4> | |
1430 | <p>Get a sub-field value. | |
1431 | ||
1432 | </p> | |
1433 | <h4>Syntax</h4> | |
1434 | <pre> | |
ecdc0628 | 1435 | char * |
ef416fc2 | 1436 | httpGetSubField2( |
1437 | <a href='#http_t'>http_t</a> * http, | |
1438 | http_field_t field, | |
ecdc0628 | 1439 | const char * name, |
1440 | char * value, | |
ef416fc2 | 1441 | int valuelen); |
1442 | </pre> | |
1443 | <h4>Arguments</h4> | |
1444 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1445 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1446 | <tbody> | |
ecdc0628 | 1447 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1448 | <tr><td><tt>field</tt></td><td>Field index</td></tr> |
1449 | <tr><td><tt>name</tt></td><td>Name of sub-field</td></tr> | |
1450 | <tr><td><tt>value</tt></td><td>Value string</td></tr> | |
1451 | <tr><td><tt>valuelen</tt></td><td>Size of value buffer</td></tr> | |
1452 | </tbody></table></div> | |
1453 | <h4>Returns</h4> | |
1454 | <p>Value or NULL</p> | |
1455 | <!-- NEW PAGE --> | |
1456 | <h3 class='title'><a name='httpGets'>httpGets()</a></h3> | |
1457 | <h4>Description</h4> | |
1458 | <p>Get a line of text from a HTTP connection.</p> | |
1459 | <h4>Syntax</h4> | |
1460 | <pre> | |
ecdc0628 | 1461 | char * |
ef416fc2 | 1462 | httpGets( |
ecdc0628 | 1463 | char * line, |
ef416fc2 | 1464 | int length, |
1465 | <a href='#http_t'>http_t</a> * http); | |
1466 | </pre> | |
1467 | <h4>Arguments</h4> | |
1468 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1469 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1470 | <tbody> | |
1471 | <tr><td><tt>line</tt></td><td>Line to read into</td></tr> | |
1472 | <tr><td><tt>length</tt></td><td>Max length of buffer</td></tr> | |
ecdc0628 | 1473 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1474 | </tbody></table></div> |
1475 | <h4>Returns</h4> | |
1476 | <p>Line or NULL</p> | |
1477 | <!-- NEW PAGE --> | |
1478 | <h3 class='title'><a name='httpHead'>httpHead()</a></h3> | |
1479 | <h4>Description</h4> | |
1480 | <p>Send a HEAD request to the server.</p> | |
1481 | <h4>Syntax</h4> | |
1482 | <pre> | |
1483 | int | |
1484 | httpHead( | |
1485 | <a href='#http_t'>http_t</a> * http, | |
ecdc0628 | 1486 | const char * uri); |
ef416fc2 | 1487 | </pre> |
1488 | <h4>Arguments</h4> | |
1489 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1490 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1491 | <tbody> | |
ecdc0628 | 1492 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1493 | <tr><td><tt>uri</tt></td><td>URI for head</td></tr> |
1494 | </tbody></table></div> | |
1495 | <h4>Returns</h4> | |
1496 | <p>Status of call (0 = success)</p> | |
1497 | <!-- NEW PAGE --> | |
1498 | <h3 class='title'><a name='httpInitialize'>httpInitialize()</a></h3> | |
1499 | <h4>Description</h4> | |
1500 | <p>Initialize the HTTP interface library and set the | |
1501 | default HTTP proxy (if any).</p> | |
1502 | <h4>Syntax</h4> | |
1503 | <pre> | |
1504 | void | |
1505 | httpInitialize(void); | |
1506 | </pre> | |
1507 | <h4>Arguments</h4> | |
1508 | <p>None.</p> | |
1509 | <h4>Returns</h4> | |
1510 | <p>Nothing.</p> | |
1511 | <!-- NEW PAGE --> | |
1512 | <h3 class='title'><a name='httpMD5'>httpMD5()</a></h3> | |
1513 | <h4>Description</h4> | |
1514 | <p>Compute the MD5 sum of the username:group:password.</p> | |
1515 | <h4>Syntax</h4> | |
1516 | <pre> | |
ecdc0628 | 1517 | char * |
ef416fc2 | 1518 | httpMD5( |
ecdc0628 | 1519 | const char * username, |
1520 | const char * realm, | |
1521 | const char * passwd, | |
1522 | char md5[33]); | |
ef416fc2 | 1523 | </pre> |
1524 | <h4>Arguments</h4> | |
1525 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1526 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1527 | <tbody> | |
1528 | <tr><td><tt>username</tt></td><td>User name</td></tr> | |
1529 | <tr><td><tt>realm</tt></td><td>Realm name</td></tr> | |
1530 | <tr><td><tt>passwd</tt></td><td>Password string</td></tr> | |
1531 | <tr><td><tt>md5[33]</tt></td><td>MD5 string</td></tr> | |
1532 | </tbody></table></div> | |
1533 | <h4>Returns</h4> | |
1534 | <p>MD5 sum</p> | |
1535 | <!-- NEW PAGE --> | |
1536 | <h3 class='title'><a name='httpMD5Final'>httpMD5Final()</a></h3> | |
1537 | <h4>Description</h4> | |
1538 | <p>Combine the MD5 sum of the username, group, and password | |
1539 | with the server-supplied nonce value, method, and | |
1540 | request-uri.</p> | |
1541 | <h4>Syntax</h4> | |
1542 | <pre> | |
ecdc0628 | 1543 | char * |
ef416fc2 | 1544 | httpMD5Final( |
ecdc0628 | 1545 | const char * nonce, |
1546 | const char * method, | |
1547 | const char * resource, | |
1548 | char md5[33]); | |
ef416fc2 | 1549 | </pre> |
1550 | <h4>Arguments</h4> | |
1551 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1552 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1553 | <tbody> | |
1554 | <tr><td><tt>nonce</tt></td><td>Server nonce value</td></tr> | |
1555 | <tr><td><tt>method</tt></td><td>METHOD (GET, POST, etc.)</td></tr> | |
1556 | <tr><td><tt>resource</tt></td><td>Resource path</td></tr> | |
1557 | <tr><td><tt>md5[33]</tt></td><td>MD5 sum</td></tr> | |
1558 | </tbody></table></div> | |
1559 | <h4>Returns</h4> | |
1560 | <p>New sum</p> | |
1561 | <!-- NEW PAGE --> | |
1562 | <h3 class='title'><a name='httpMD5String'>httpMD5String()</a></h3> | |
1563 | <h4>Description</h4> | |
1564 | <p>Convert an MD5 sum to a character string.</p> | |
1565 | <h4>Syntax</h4> | |
1566 | <pre> | |
ecdc0628 | 1567 | char * |
ef416fc2 | 1568 | httpMD5String( |
ecdc0628 | 1569 | const unsigned char * sum, |
1570 | char md5[33]); | |
ef416fc2 | 1571 | </pre> |
1572 | <h4>Arguments</h4> | |
1573 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1574 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1575 | <tbody> | |
1576 | <tr><td><tt>sum</tt></td><td>MD5 sum data</td></tr> | |
1577 | <tr><td><tt>md5[33]</tt></td><td>MD5 sum in hex</td></tr> | |
1578 | </tbody></table></div> | |
1579 | <h4>Returns</h4> | |
1580 | <p>MD5 sum in hex</p> | |
1581 | <!-- NEW PAGE --> | |
1582 | <h3 class='title'><a name='httpOptions'>httpOptions()</a></h3> | |
1583 | <h4>Description</h4> | |
1584 | <p>Send an OPTIONS request to the server.</p> | |
1585 | <h4>Syntax</h4> | |
1586 | <pre> | |
1587 | int | |
1588 | httpOptions( | |
1589 | <a href='#http_t'>http_t</a> * http, | |
ecdc0628 | 1590 | const char * uri); |
ef416fc2 | 1591 | </pre> |
1592 | <h4>Arguments</h4> | |
1593 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1594 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1595 | <tbody> | |
ecdc0628 | 1596 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1597 | <tr><td><tt>uri</tt></td><td>URI for options</td></tr> |
1598 | </tbody></table></div> | |
1599 | <h4>Returns</h4> | |
1600 | <p>Status of call (0 = success)</p> | |
1601 | <!-- NEW PAGE --> | |
1602 | <h3 class='title'><a name='httpPost'>httpPost()</a></h3> | |
1603 | <h4>Description</h4> | |
1604 | <p>Send a POST request to the server.</p> | |
1605 | <h4>Syntax</h4> | |
1606 | <pre> | |
1607 | int | |
1608 | httpPost( | |
1609 | <a href='#http_t'>http_t</a> * http, | |
ecdc0628 | 1610 | const char * uri); |
ef416fc2 | 1611 | </pre> |
1612 | <h4>Arguments</h4> | |
1613 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1614 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1615 | <tbody> | |
ecdc0628 | 1616 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1617 | <tr><td><tt>uri</tt></td><td>URI for post</td></tr> |
1618 | </tbody></table></div> | |
1619 | <h4>Returns</h4> | |
1620 | <p>Status of call (0 = success)</p> | |
1621 | <!-- NEW PAGE --> | |
ecdc0628 | 1622 | <h3 class='title'><a name='httpPut'>httpPut()</a></h3> |
ef416fc2 | 1623 | <h4>Description</h4> |
ecdc0628 | 1624 | <p>Send a PUT request to the server.</p> |
ef416fc2 | 1625 | <h4>Syntax</h4> |
1626 | <pre> | |
1627 | int | |
ecdc0628 | 1628 | httpPut( |
ef416fc2 | 1629 | <a href='#http_t'>http_t</a> * http, |
ecdc0628 | 1630 | const char * uri); |
ef416fc2 | 1631 | </pre> |
1632 | <h4>Arguments</h4> | |
1633 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1634 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1635 | <tbody> | |
ecdc0628 | 1636 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
1637 | <tr><td><tt>uri</tt></td><td>URI to put</td></tr> | |
ef416fc2 | 1638 | </tbody></table></div> |
1639 | <h4>Returns</h4> | |
ecdc0628 | 1640 | <p>Status of call (0 = success)</p> |
ef416fc2 | 1641 | <!-- NEW PAGE --> |
ecdc0628 | 1642 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpRead'>httpRead()</a></h3> |
ef416fc2 | 1643 | <h4>Description</h4> |
ecdc0628 | 1644 | <p>Read data from a HTTP connection. |
1645 | ||
1646 | This function is deprecated. Use the httpRead2() function which can | |
1647 | read more than 2GB of data. | |
1648 | ||
1649 | </p> | |
ef416fc2 | 1650 | <h4>Syntax</h4> |
1651 | <pre> | |
1652 | int | |
ecdc0628 | 1653 | httpRead( |
ef416fc2 | 1654 | <a href='#http_t'>http_t</a> * http, |
ecdc0628 | 1655 | char * buffer, |
1656 | int length); | |
ef416fc2 | 1657 | </pre> |
1658 | <h4>Arguments</h4> | |
1659 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1660 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1661 | <tbody> | |
ecdc0628 | 1662 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
1663 | <tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr> | |
1664 | <tr><td><tt>length</tt></td><td>Maximum number of bytes</td></tr> | |
ef416fc2 | 1665 | </tbody></table></div> |
1666 | <h4>Returns</h4> | |
ecdc0628 | 1667 | <p>Number of bytes read</p> |
ef416fc2 | 1668 | <!-- NEW PAGE --> |
ecdc0628 | 1669 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpRead2'>httpRead2()</a></h3> |
ef416fc2 | 1670 | <h4>Description</h4> |
ecdc0628 | 1671 | <p>Read data from a HTTP connection. |
1672 | ||
1673 | </p> | |
ef416fc2 | 1674 | <h4>Syntax</h4> |
1675 | <pre> | |
ecdc0628 | 1676 | ssize_t |
1677 | httpRead2( | |
ef416fc2 | 1678 | <a href='#http_t'>http_t</a> * http, |
ecdc0628 | 1679 | char * buffer, |
1680 | size_t length); | |
ef416fc2 | 1681 | </pre> |
1682 | <h4>Arguments</h4> | |
1683 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1684 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1685 | <tbody> | |
ecdc0628 | 1686 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1687 | <tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr> |
1688 | <tr><td><tt>length</tt></td><td>Maximum number of bytes</td></tr> | |
1689 | </tbody></table></div> | |
1690 | <h4>Returns</h4> | |
1691 | <p>Number of bytes read</p> | |
1692 | <!-- NEW PAGE --> | |
1693 | <h3 class='title'><a name='httpReconnect'>httpReconnect()</a></h3> | |
1694 | <h4>Description</h4> | |
ecdc0628 | 1695 | <p>Reconnect to a HTTP server.</p> |
ef416fc2 | 1696 | <h4>Syntax</h4> |
1697 | <pre> | |
1698 | int | |
1699 | httpReconnect( | |
1700 | <a href='#http_t'>http_t</a> * http); | |
1701 | </pre> | |
1702 | <h4>Arguments</h4> | |
1703 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1704 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1705 | <tbody> | |
ecdc0628 | 1706 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1707 | </tbody></table></div> |
1708 | <h4>Returns</h4> | |
1709 | <p>0 on success, non-zero on failure</p> | |
1710 | <!-- NEW PAGE --> | |
ecdc0628 | 1711 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpSeparate'>httpSeparate()</a></h3> |
ef416fc2 | 1712 | <h4>Description</h4> |
1713 | <p>Separate a Universal Resource Identifier into its | |
ecdc0628 | 1714 | components. |
1715 | ||
1716 | This function is deprecated; use the httpSeparateURI() function instead. | |
1717 | ||
1718 | </p> | |
ef416fc2 | 1719 | <h4>Syntax</h4> |
1720 | <pre> | |
1721 | void | |
1722 | httpSeparate( | |
ecdc0628 | 1723 | const char * uri, |
1724 | char * scheme, | |
1725 | char * username, | |
1726 | char * host, | |
ef416fc2 | 1727 | int * port, |
ecdc0628 | 1728 | char * resource); |
ef416fc2 | 1729 | </pre> |
1730 | <h4>Arguments</h4> | |
1731 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1732 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1733 | <tbody> | |
1734 | <tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr> | |
1735 | <tr><td><tt>scheme</tt></td><td>Scheme [32] (http, https, etc.)</td></tr> | |
1736 | <tr><td><tt>username</tt></td><td>Username [1024]</td></tr> | |
1737 | <tr><td><tt>host</tt></td><td>Hostname [1024]</td></tr> | |
1738 | <tr><td><tt>port</tt></td><td>Port number to use</td></tr> | |
1739 | <tr><td><tt>resource</tt></td><td>Resource/filename [1024]</td></tr> | |
1740 | </tbody></table></div> | |
1741 | <h4>Returns</h4> | |
1742 | <p>Nothing.</p> | |
1743 | <!-- NEW PAGE --> | |
1744 | <h3 class='title'><span class='info'> CUPS 1.1.21 </span><a name='httpSeparate2'>httpSeparate2()</a></h3> | |
1745 | <h4>Description</h4> | |
1746 | <p>Separate a Universal Resource Identifier into its | |
1747 | components. | |
1748 | ||
ecdc0628 | 1749 | This function is deprecated; use the httpSeparateURI() function instead. |
1750 | ||
1751 | ||
ef416fc2 | 1752 | </p> |
1753 | <h4>Syntax</h4> | |
1754 | <pre> | |
1755 | void | |
1756 | httpSeparate2( | |
ecdc0628 | 1757 | const char * uri, |
1758 | char * scheme, | |
ef416fc2 | 1759 | int schemelen, |
ecdc0628 | 1760 | char * username, |
ef416fc2 | 1761 | int usernamelen, |
ecdc0628 | 1762 | char * host, |
ef416fc2 | 1763 | int hostlen, |
1764 | int * port, | |
ecdc0628 | 1765 | char * resource, |
ef416fc2 | 1766 | int resourcelen); |
1767 | </pre> | |
1768 | <h4>Arguments</h4> | |
1769 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1770 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1771 | <tbody> | |
1772 | <tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr> | |
1773 | <tr><td><tt>scheme</tt></td><td>Scheme (http, https, etc.)</td></tr> | |
1774 | <tr><td><tt>schemelen</tt></td><td>Size of scheme buffer</td></tr> | |
1775 | <tr><td><tt>username</tt></td><td>Username</td></tr> | |
1776 | <tr><td><tt>usernamelen</tt></td><td>Size of username buffer</td></tr> | |
1777 | <tr><td><tt>host</tt></td><td>Hostname</td></tr> | |
1778 | <tr><td><tt>hostlen</tt></td><td>Size of hostname buffer</td></tr> | |
1779 | <tr><td><tt>port</tt></td><td>Port number to use</td></tr> | |
1780 | <tr><td><tt>resource</tt></td><td>Resource/filename</td></tr> | |
1781 | <tr><td><tt>resourcelen</tt></td><td>Size of resource buffer</td></tr> | |
1782 | </tbody></table></div> | |
1783 | <h4>Returns</h4> | |
1784 | <p>Nothing.</p> | |
1785 | <!-- NEW PAGE --> | |
1786 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpSeparateURI'>httpSeparateURI()</a></h3> | |
1787 | <h4>Description</h4> | |
1788 | <p>Separate a Universal Resource Identifier into its | |
1789 | components. | |
1790 | ||
1791 | </p> | |
1792 | <h4>Syntax</h4> | |
1793 | <pre> | |
1794 | http_uri_status_t | |
1795 | httpSeparateURI( | |
ecdc0628 | 1796 | http_uri_coding_t decoding, |
1797 | const char * uri, | |
1798 | char * scheme, | |
ef416fc2 | 1799 | int schemelen, |
ecdc0628 | 1800 | char * username, |
ef416fc2 | 1801 | int usernamelen, |
ecdc0628 | 1802 | char * host, |
ef416fc2 | 1803 | int hostlen, |
1804 | int * port, | |
ecdc0628 | 1805 | char * resource, |
ef416fc2 | 1806 | int resourcelen); |
1807 | </pre> | |
1808 | <h4>Arguments</h4> | |
1809 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1810 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1811 | <tbody> | |
ecdc0628 | 1812 | <tr><td><tt>decoding</tt></td><td>Decoding flags</td></tr> |
ef416fc2 | 1813 | <tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr> |
1814 | <tr><td><tt>scheme</tt></td><td>Scheme (http, https, etc.)</td></tr> | |
1815 | <tr><td><tt>schemelen</tt></td><td>Size of scheme buffer</td></tr> | |
1816 | <tr><td><tt>username</tt></td><td>Username</td></tr> | |
1817 | <tr><td><tt>usernamelen</tt></td><td>Size of username buffer</td></tr> | |
1818 | <tr><td><tt>host</tt></td><td>Hostname</td></tr> | |
1819 | <tr><td><tt>hostlen</tt></td><td>Size of hostname buffer</td></tr> | |
1820 | <tr><td><tt>port</tt></td><td>Port number to use</td></tr> | |
1821 | <tr><td><tt>resource</tt></td><td>Resource/filename</td></tr> | |
1822 | <tr><td><tt>resourcelen</tt></td><td>Size of resource buffer</td></tr> | |
1823 | </tbody></table></div> | |
1824 | <h4>Returns</h4> | |
1825 | <p>Result of separation</p> | |
1826 | <!-- NEW PAGE --> | |
1827 | <h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='httpSetCookie'>httpSetCookie()</a></h3> | |
1828 | <h4>Description</h4> | |
1829 | <p>Set the cookie value(s)... | |
1830 | ||
1831 | </p> | |
1832 | <h4>Syntax</h4> | |
1833 | <pre> | |
1834 | void | |
1835 | httpSetCookie( | |
1836 | <a href='#http_t'>http_t</a> * http, | |
ecdc0628 | 1837 | const char * cookie); |
ef416fc2 | 1838 | </pre> |
1839 | <h4>Arguments</h4> | |
1840 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1841 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1842 | <tbody> | |
1843 | <tr><td><tt>http</tt></td><td>Connection</td></tr> | |
1844 | <tr><td><tt>cookie</tt></td><td>Cookie string</td></tr> | |
1845 | </tbody></table></div> | |
1846 | <h4>Returns</h4> | |
1847 | <p>Nothing.</p> | |
1848 | <!-- NEW PAGE --> | |
1849 | <h3 class='title'><a name='httpSetField'>httpSetField()</a></h3> | |
1850 | <h4>Description</h4> | |
1851 | <p>Set the value of an HTTP header.</p> | |
1852 | <h4>Syntax</h4> | |
1853 | <pre> | |
1854 | void | |
1855 | httpSetField( | |
1856 | <a href='#http_t'>http_t</a> * http, | |
1857 | http_field_t field, | |
ecdc0628 | 1858 | const char * value); |
ef416fc2 | 1859 | </pre> |
1860 | <h4>Arguments</h4> | |
1861 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1862 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1863 | <tbody> | |
ecdc0628 | 1864 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1865 | <tr><td><tt>field</tt></td><td>Field index</td></tr> |
1866 | <tr><td><tt>value</tt></td><td>Value</td></tr> | |
1867 | </tbody></table></div> | |
1868 | <h4>Returns</h4> | |
1869 | <p>Nothing.</p> | |
1870 | <!-- NEW PAGE --> | |
1871 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpSetLength'>httpSetLength()</a></h3> | |
1872 | <h4>Description</h4> | |
1873 | <p>Set the content-length and content-encoding. | |
1874 | ||
1875 | </p> | |
1876 | <h4>Syntax</h4> | |
1877 | <pre> | |
1878 | void | |
1879 | httpSetLength( | |
1880 | <a href='#http_t'>http_t</a> * http, | |
1881 | size_t length); | |
1882 | </pre> | |
1883 | <h4>Arguments</h4> | |
1884 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1885 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1886 | <tbody> | |
ecdc0628 | 1887 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1888 | <tr><td><tt>length</tt></td><td>Length (0 for chunked)</td></tr> |
1889 | </tbody></table></div> | |
1890 | <h4>Returns</h4> | |
1891 | <p>Nothing.</p> | |
1892 | <!-- NEW PAGE --> | |
1893 | <h3 class='title'><a name='httpStatus'>httpStatus()</a></h3> | |
1894 | <h4>Description</h4> | |
1895 | <p>Return a short string describing a HTTP status code.</p> | |
1896 | <h4>Syntax</h4> | |
1897 | <pre> | |
ecdc0628 | 1898 | const char * |
ef416fc2 | 1899 | httpStatus( |
1900 | http_status_t status); | |
1901 | </pre> | |
1902 | <h4>Arguments</h4> | |
1903 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1904 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1905 | <tbody> | |
1906 | <tr><td><tt>status</tt></td><td>HTTP status code</td></tr> | |
1907 | </tbody></table></div> | |
1908 | <h4>Returns</h4> | |
1909 | <p>String or NULL</p> | |
1910 | <!-- NEW PAGE --> | |
1911 | <h3 class='title'><a name='httpTrace'>httpTrace()</a></h3> | |
1912 | <h4>Description</h4> | |
1913 | <p>Send an TRACE request to the server.</p> | |
1914 | <h4>Syntax</h4> | |
1915 | <pre> | |
1916 | int | |
1917 | httpTrace( | |
1918 | <a href='#http_t'>http_t</a> * http, | |
ecdc0628 | 1919 | const char * uri); |
ef416fc2 | 1920 | </pre> |
1921 | <h4>Arguments</h4> | |
1922 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1923 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1924 | <tbody> | |
ecdc0628 | 1925 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1926 | <tr><td><tt>uri</tt></td><td>URI for trace</td></tr> |
1927 | </tbody></table></div> | |
1928 | <h4>Returns</h4> | |
1929 | <p>Status of call (0 = success)</p> | |
1930 | <!-- NEW PAGE --> | |
1931 | <h3 class='title'><a name='httpUpdate'>httpUpdate()</a></h3> | |
1932 | <h4>Description</h4> | |
1933 | <p>Update the current HTTP state for incoming data.</p> | |
1934 | <h4>Syntax</h4> | |
1935 | <pre> | |
1936 | http_status_t | |
1937 | httpUpdate( | |
1938 | <a href='#http_t'>http_t</a> * http); | |
1939 | </pre> | |
1940 | <h4>Arguments</h4> | |
1941 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1942 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1943 | <tbody> | |
ecdc0628 | 1944 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1945 | </tbody></table></div> |
1946 | <h4>Returns</h4> | |
1947 | <p>HTTP status</p> | |
1948 | <!-- NEW PAGE --> | |
1949 | <h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='httpWait'>httpWait()</a></h3> | |
1950 | <h4>Description</h4> | |
1951 | <p>Wait for data available on a connection. | |
1952 | ||
1953 | </p> | |
1954 | <h4>Syntax</h4> | |
1955 | <pre> | |
1956 | int | |
1957 | httpWait( | |
1958 | <a href='#http_t'>http_t</a> * http, | |
1959 | int msec); | |
1960 | </pre> | |
1961 | <h4>Arguments</h4> | |
1962 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1963 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1964 | <tbody> | |
ecdc0628 | 1965 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
ef416fc2 | 1966 | <tr><td><tt>msec</tt></td><td>Milliseconds to wait</td></tr> |
1967 | </tbody></table></div> | |
1968 | <h4>Returns</h4> | |
1969 | <p>1 if data is available, 0 otherwise</p> | |
1970 | <!-- NEW PAGE --> | |
ecdc0628 | 1971 | <h3 class='title'><span class='info'> DEPRECATED </span><a name='httpWrite'>httpWrite()</a></h3> |
ef416fc2 | 1972 | <h4>Description</h4> |
ecdc0628 | 1973 | <p>Write data to a HTTP connection. |
1974 | ||
1975 | This function is deprecated. Use the httpWrite2() function which can | |
1976 | write more than 2GB of data. | |
1977 | ||
1978 | </p> | |
ef416fc2 | 1979 | <h4>Syntax</h4> |
1980 | <pre> | |
1981 | int | |
1982 | httpWrite( | |
1983 | <a href='#http_t'>http_t</a> * http, | |
ecdc0628 | 1984 | const char * buffer, |
ef416fc2 | 1985 | int length); |
1986 | </pre> | |
1987 | <h4>Arguments</h4> | |
1988 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
1989 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
1990 | <tbody> | |
ecdc0628 | 1991 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> |
1992 | <tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr> | |
1993 | <tr><td><tt>length</tt></td><td>Number of bytes to write</td></tr> | |
1994 | </tbody></table></div> | |
1995 | <h4>Returns</h4> | |
1996 | <p>Number of bytes written</p> | |
1997 | <!-- NEW PAGE --> | |
1998 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpWrite2'>httpWrite2()</a></h3> | |
1999 | <h4>Description</h4> | |
2000 | <p>Write data to a HTTP connection. | |
2001 | ||
2002 | </p> | |
2003 | <h4>Syntax</h4> | |
2004 | <pre> | |
2005 | ssize_t | |
2006 | httpWrite2( | |
2007 | <a href='#http_t'>http_t</a> * http, | |
2008 | const char * buffer, | |
2009 | size_t length); | |
2010 | </pre> | |
2011 | <h4>Arguments</h4> | |
2012 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2013 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2014 | <tbody> | |
2015 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
ef416fc2 | 2016 | <tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr> |
2017 | <tr><td><tt>length</tt></td><td>Number of bytes to write</td></tr> | |
2018 | </tbody></table></div> | |
2019 | <h4>Returns</h4> | |
2020 | <p>Number of bytes written</p> | |
2021 | <!-- NEW PAGE --> | |
2022 | <h3 class='title'><a name='ippAddBoolean'>ippAddBoolean()</a></h3> | |
2023 | <h4>Description</h4> | |
ecdc0628 | 2024 | <p>Add a boolean attribute to an IPP message.</p> |
ef416fc2 | 2025 | <h4>Syntax</h4> |
2026 | <pre> | |
2027 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2028 | ippAddBoolean( | |
2029 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2030 | ipp_tag_t group, | |
ecdc0628 | 2031 | const char * name, |
2032 | char value); | |
ef416fc2 | 2033 | </pre> |
2034 | <h4>Arguments</h4> | |
2035 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2036 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2037 | <tbody> | |
ecdc0628 | 2038 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2039 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2040 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2041 | <tr><td><tt>value</tt></td><td>Value of attribute</td></tr> | |
2042 | </tbody></table></div> | |
2043 | <h4>Returns</h4> | |
2044 | <p>New attribute</p> | |
2045 | <!-- NEW PAGE --> | |
2046 | <h3 class='title'><a name='ippAddBooleans'>ippAddBooleans()</a></h3> | |
2047 | <h4>Description</h4> | |
2048 | <p>Add an array of boolean values.</p> | |
2049 | <h4>Syntax</h4> | |
2050 | <pre> | |
2051 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2052 | ippAddBooleans( | |
2053 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2054 | ipp_tag_t group, | |
ecdc0628 | 2055 | const char * name, |
ef416fc2 | 2056 | int num_values, |
ecdc0628 | 2057 | const char * values); |
ef416fc2 | 2058 | </pre> |
2059 | <h4>Arguments</h4> | |
2060 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2061 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2062 | <tbody> | |
ecdc0628 | 2063 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2064 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2065 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2066 | <tr><td><tt>num_values</tt></td><td>Number of values</td></tr> | |
2067 | <tr><td><tt>values</tt></td><td>Values</td></tr> | |
2068 | </tbody></table></div> | |
2069 | <h4>Returns</h4> | |
2070 | <p>New attribute</p> | |
2071 | <!-- NEW PAGE --> | |
2072 | <h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippAddCollection'>ippAddCollection()</a></h3> | |
2073 | <h4>Description</h4> | |
2074 | <p>Add a collection value. | |
2075 | ||
2076 | </p> | |
2077 | <h4>Syntax</h4> | |
2078 | <pre> | |
2079 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2080 | ippAddCollection( | |
2081 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2082 | ipp_tag_t group, | |
ecdc0628 | 2083 | const char * name, |
ef416fc2 | 2084 | <a href='#ipp_t'>ipp_t</a> * value); |
2085 | </pre> | |
2086 | <h4>Arguments</h4> | |
2087 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2088 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2089 | <tbody> | |
ecdc0628 | 2090 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2091 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2092 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2093 | <tr><td><tt>value</tt></td><td>Value</td></tr> | |
2094 | </tbody></table></div> | |
2095 | <h4>Returns</h4> | |
2096 | <p>New attribute</p> | |
2097 | <!-- NEW PAGE --> | |
2098 | <h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippAddCollections'>ippAddCollections()</a></h3> | |
2099 | <h4>Description</h4> | |
2100 | <p>Add an array of collection values. | |
2101 | ||
2102 | </p> | |
2103 | <h4>Syntax</h4> | |
2104 | <pre> | |
2105 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2106 | ippAddCollections( | |
2107 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2108 | ipp_tag_t group, | |
ecdc0628 | 2109 | const char * name, |
ef416fc2 | 2110 | int num_values, |
2111 | const <a href='#ipp_t'>ipp_t</a> ** values); | |
2112 | </pre> | |
2113 | <h4>Arguments</h4> | |
2114 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2115 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2116 | <tbody> | |
ecdc0628 | 2117 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2118 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2119 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2120 | <tr><td><tt>num_values</tt></td><td>Number of values</td></tr> | |
2121 | <tr><td><tt>values</tt></td><td>Values</td></tr> | |
2122 | </tbody></table></div> | |
2123 | <h4>Returns</h4> | |
2124 | <p>New attribute</p> | |
2125 | <!-- NEW PAGE --> | |
2126 | <h3 class='title'><a name='ippAddDate'>ippAddDate()</a></h3> | |
2127 | <h4>Description</h4> | |
ecdc0628 | 2128 | <p>Add a date attribute to an IPP message.</p> |
ef416fc2 | 2129 | <h4>Syntax</h4> |
2130 | <pre> | |
2131 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2132 | ippAddDate( | |
2133 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2134 | ipp_tag_t group, | |
ecdc0628 | 2135 | const char * name, |
ef416fc2 | 2136 | const <a href='#ipp_uchar_t'>ipp_uchar_t</a> * value); |
2137 | </pre> | |
2138 | <h4>Arguments</h4> | |
2139 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2140 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2141 | <tbody> | |
ecdc0628 | 2142 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2143 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2144 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2145 | <tr><td><tt>value</tt></td><td>Value</td></tr> | |
2146 | </tbody></table></div> | |
2147 | <h4>Returns</h4> | |
2148 | <p>New attribute</p> | |
2149 | <!-- NEW PAGE --> | |
2150 | <h3 class='title'><a name='ippAddInteger'>ippAddInteger()</a></h3> | |
2151 | <h4>Description</h4> | |
ecdc0628 | 2152 | <p>Add a integer attribute to an IPP message.</p> |
ef416fc2 | 2153 | <h4>Syntax</h4> |
2154 | <pre> | |
2155 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2156 | ippAddInteger( | |
2157 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2158 | ipp_tag_t group, | |
2159 | ipp_tag_t type, | |
ecdc0628 | 2160 | const char * name, |
ef416fc2 | 2161 | int value); |
2162 | </pre> | |
2163 | <h4>Arguments</h4> | |
2164 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2165 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2166 | <tbody> | |
ecdc0628 | 2167 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2168 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2169 | <tr><td><tt>type</tt></td><td>Type of attribute</td></tr> | |
2170 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2171 | <tr><td><tt>value</tt></td><td>Value of attribute</td></tr> | |
2172 | </tbody></table></div> | |
2173 | <h4>Returns</h4> | |
2174 | <p>New attribute</p> | |
2175 | <!-- NEW PAGE --> | |
2176 | <h3 class='title'><a name='ippAddIntegers'>ippAddIntegers()</a></h3> | |
2177 | <h4>Description</h4> | |
2178 | <p>Add an array of integer values.</p> | |
2179 | <h4>Syntax</h4> | |
2180 | <pre> | |
2181 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2182 | ippAddIntegers( | |
2183 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2184 | ipp_tag_t group, | |
2185 | ipp_tag_t type, | |
ecdc0628 | 2186 | const char * name, |
ef416fc2 | 2187 | int num_values, |
2188 | const int * values); | |
2189 | </pre> | |
2190 | <h4>Arguments</h4> | |
2191 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2192 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2193 | <tbody> | |
ecdc0628 | 2194 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2195 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2196 | <tr><td><tt>type</tt></td><td>Type of attribute</td></tr> | |
2197 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2198 | <tr><td><tt>num_values</tt></td><td>Number of values</td></tr> | |
2199 | <tr><td><tt>values</tt></td><td>Values</td></tr> | |
2200 | </tbody></table></div> | |
2201 | <h4>Returns</h4> | |
2202 | <p>New attribute</p> | |
2203 | <!-- NEW PAGE --> | |
2204 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippAddOctetString'>ippAddOctetString()</a></h3> | |
2205 | <h4>Description</h4> | |
ecdc0628 | 2206 | <p>Add an octetString value to an IPP message. |
ef416fc2 | 2207 | |
2208 | </p> | |
2209 | <h4>Syntax</h4> | |
2210 | <pre> | |
2211 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2212 | ippAddOctetString( | |
2213 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2214 | ipp_tag_t group, | |
ecdc0628 | 2215 | const char * name, |
ef416fc2 | 2216 | const void * data, |
2217 | int datalen); | |
2218 | </pre> | |
2219 | <h4>Arguments</h4> | |
2220 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2221 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2222 | <tbody> | |
ecdc0628 | 2223 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2224 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2225 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2226 | <tr><td><tt>data</tt></td><td>octetString data</td></tr> | |
2227 | <tr><td><tt>datalen</tt></td><td>Length of data in bytes</td></tr> | |
2228 | </tbody></table></div> | |
2229 | <h4>Returns</h4> | |
2230 | <p>New attribute</p> | |
2231 | <!-- NEW PAGE --> | |
2232 | <h3 class='title'><a name='ippAddRange'>ippAddRange()</a></h3> | |
2233 | <h4>Description</h4> | |
ecdc0628 | 2234 | <p>Add a range of values to an IPP message.</p> |
ef416fc2 | 2235 | <h4>Syntax</h4> |
2236 | <pre> | |
2237 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2238 | ippAddRange( | |
2239 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2240 | ipp_tag_t group, | |
ecdc0628 | 2241 | const char * name, |
ef416fc2 | 2242 | int lower, |
2243 | int upper); | |
2244 | </pre> | |
2245 | <h4>Arguments</h4> | |
2246 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2247 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2248 | <tbody> | |
ecdc0628 | 2249 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2250 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2251 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2252 | <tr><td><tt>lower</tt></td><td>Lower value</td></tr> | |
2253 | <tr><td><tt>upper</tt></td><td>Upper value</td></tr> | |
2254 | </tbody></table></div> | |
2255 | <h4>Returns</h4> | |
2256 | <p>New attribute</p> | |
2257 | <!-- NEW PAGE --> | |
2258 | <h3 class='title'><a name='ippAddRanges'>ippAddRanges()</a></h3> | |
2259 | <h4>Description</h4> | |
ecdc0628 | 2260 | <p>Add ranges of values to an IPP message.</p> |
ef416fc2 | 2261 | <h4>Syntax</h4> |
2262 | <pre> | |
2263 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2264 | ippAddRanges( | |
2265 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2266 | ipp_tag_t group, | |
ecdc0628 | 2267 | const char * name, |
ef416fc2 | 2268 | int num_values, |
2269 | const int * lower, | |
2270 | const int * upper); | |
2271 | </pre> | |
2272 | <h4>Arguments</h4> | |
2273 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2274 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2275 | <tbody> | |
ecdc0628 | 2276 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2277 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2278 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2279 | <tr><td><tt>num_values</tt></td><td>Number of values</td></tr> | |
2280 | <tr><td><tt>lower</tt></td><td>Lower values</td></tr> | |
2281 | <tr><td><tt>upper</tt></td><td>Upper values</td></tr> | |
2282 | </tbody></table></div> | |
2283 | <h4>Returns</h4> | |
2284 | <p>New attribute</p> | |
2285 | <!-- NEW PAGE --> | |
2286 | <h3 class='title'><a name='ippAddResolution'>ippAddResolution()</a></h3> | |
2287 | <h4>Description</h4> | |
ecdc0628 | 2288 | <p>Add a resolution value to an IPP message.</p> |
ef416fc2 | 2289 | <h4>Syntax</h4> |
2290 | <pre> | |
2291 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2292 | ippAddResolution( | |
2293 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2294 | ipp_tag_t group, | |
ecdc0628 | 2295 | const char * name, |
ef416fc2 | 2296 | ipp_res_t units, |
2297 | int xres, | |
2298 | int yres); | |
2299 | </pre> | |
2300 | <h4>Arguments</h4> | |
2301 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2302 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2303 | <tbody> | |
ecdc0628 | 2304 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2305 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2306 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2307 | <tr><td><tt>units</tt></td><td>Units for resolution</td></tr> | |
2308 | <tr><td><tt>xres</tt></td><td>X resolution</td></tr> | |
2309 | <tr><td><tt>yres</tt></td><td>Y resolution</td></tr> | |
2310 | </tbody></table></div> | |
2311 | <h4>Returns</h4> | |
2312 | <p>New attribute</p> | |
2313 | <!-- NEW PAGE --> | |
2314 | <h3 class='title'><a name='ippAddResolutions'>ippAddResolutions()</a></h3> | |
2315 | <h4>Description</h4> | |
ecdc0628 | 2316 | <p>Add resolution values to an IPP message.</p> |
ef416fc2 | 2317 | <h4>Syntax</h4> |
2318 | <pre> | |
2319 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2320 | ippAddResolutions( | |
2321 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2322 | ipp_tag_t group, | |
ecdc0628 | 2323 | const char * name, |
ef416fc2 | 2324 | int num_values, |
2325 | ipp_res_t units, | |
2326 | const int * xres, | |
2327 | const int * yres); | |
2328 | </pre> | |
2329 | <h4>Arguments</h4> | |
2330 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2331 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2332 | <tbody> | |
ecdc0628 | 2333 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2334 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2335 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2336 | <tr><td><tt>num_values</tt></td><td>Number of values</td></tr> | |
2337 | <tr><td><tt>units</tt></td><td>Units for resolution</td></tr> | |
2338 | <tr><td><tt>xres</tt></td><td>X resolutions</td></tr> | |
2339 | <tr><td><tt>yres</tt></td><td>Y resolutions</td></tr> | |
2340 | </tbody></table></div> | |
2341 | <h4>Returns</h4> | |
2342 | <p>New attribute</p> | |
2343 | <!-- NEW PAGE --> | |
2344 | <h3 class='title'><a name='ippAddSeparator'>ippAddSeparator()</a></h3> | |
2345 | <h4>Description</h4> | |
ecdc0628 | 2346 | <p>Add a group separator to an IPP message.</p> |
ef416fc2 | 2347 | <h4>Syntax</h4> |
2348 | <pre> | |
2349 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2350 | ippAddSeparator( | |
2351 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2352 | </pre> | |
2353 | <h4>Arguments</h4> | |
2354 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2355 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2356 | <tbody> | |
ecdc0628 | 2357 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2358 | </tbody></table></div> |
2359 | <h4>Returns</h4> | |
2360 | <p>New attribute</p> | |
2361 | <!-- NEW PAGE --> | |
2362 | <h3 class='title'><a name='ippAddString'>ippAddString()</a></h3> | |
2363 | <h4>Description</h4> | |
ecdc0628 | 2364 | <p>Add a language-encoded string to an IPP message.</p> |
ef416fc2 | 2365 | <h4>Syntax</h4> |
2366 | <pre> | |
2367 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2368 | ippAddString( | |
2369 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2370 | ipp_tag_t group, | |
2371 | ipp_tag_t type, | |
ecdc0628 | 2372 | const char * name, |
2373 | const char * charset, | |
2374 | const char * value); | |
ef416fc2 | 2375 | </pre> |
2376 | <h4>Arguments</h4> | |
2377 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2378 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2379 | <tbody> | |
ecdc0628 | 2380 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2381 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2382 | <tr><td><tt>type</tt></td><td>Type of attribute</td></tr> | |
2383 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2384 | <tr><td><tt>charset</tt></td><td>Character set</td></tr> | |
2385 | <tr><td><tt>value</tt></td><td>Value</td></tr> | |
2386 | </tbody></table></div> | |
2387 | <h4>Returns</h4> | |
2388 | <p>New attribute</p> | |
2389 | <!-- NEW PAGE --> | |
2390 | <h3 class='title'><a name='ippAddStrings'>ippAddStrings()</a></h3> | |
2391 | <h4>Description</h4> | |
ecdc0628 | 2392 | <p>Add language-encoded strings to an IPP message.</p> |
ef416fc2 | 2393 | <h4>Syntax</h4> |
2394 | <pre> | |
2395 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2396 | ippAddStrings( | |
2397 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2398 | ipp_tag_t group, | |
2399 | ipp_tag_t type, | |
ecdc0628 | 2400 | const char * name, |
ef416fc2 | 2401 | int num_values, |
ecdc0628 | 2402 | const char * charset, |
2403 | const char *const * values); | |
ef416fc2 | 2404 | </pre> |
2405 | <h4>Arguments</h4> | |
2406 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2407 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2408 | <tbody> | |
ecdc0628 | 2409 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2410 | <tr><td><tt>group</tt></td><td>IPP group</td></tr> |
2411 | <tr><td><tt>type</tt></td><td>Type of attribute</td></tr> | |
2412 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> | |
2413 | <tr><td><tt>num_values</tt></td><td>Number of values</td></tr> | |
2414 | <tr><td><tt>charset</tt></td><td>Character set</td></tr> | |
2415 | <tr><td><tt>values</tt></td><td>Values</td></tr> | |
2416 | </tbody></table></div> | |
2417 | <h4>Returns</h4> | |
2418 | <p>New attribute</p> | |
2419 | <!-- NEW PAGE --> | |
2420 | <h3 class='title'><a name='ippDateToTime'>ippDateToTime()</a></h3> | |
2421 | <h4>Description</h4> | |
2422 | <p>Convert from RFC 1903 Date/Time format to UNIX time | |
2423 | in seconds.</p> | |
2424 | <h4>Syntax</h4> | |
2425 | <pre> | |
2426 | time_t | |
2427 | ippDateToTime( | |
2428 | const <a href='#ipp_uchar_t'>ipp_uchar_t</a> * date); | |
2429 | </pre> | |
2430 | <h4>Arguments</h4> | |
2431 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2432 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2433 | <tbody> | |
2434 | <tr><td><tt>date</tt></td><td>RFC 1903 date info</td></tr> | |
2435 | </tbody></table></div> | |
2436 | <h4>Returns</h4> | |
2437 | <p>UNIX time value</p> | |
2438 | <!-- NEW PAGE --> | |
2439 | <h3 class='title'><a name='ippDelete'>ippDelete()</a></h3> | |
2440 | <h4>Description</h4> | |
ecdc0628 | 2441 | <p>Delete an IPP message.</p> |
ef416fc2 | 2442 | <h4>Syntax</h4> |
2443 | <pre> | |
2444 | void | |
2445 | ippDelete( | |
2446 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2447 | </pre> | |
2448 | <h4>Arguments</h4> | |
2449 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2450 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2451 | <tbody> | |
ecdc0628 | 2452 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2453 | </tbody></table></div> |
2454 | <h4>Returns</h4> | |
2455 | <p>Nothing.</p> | |
2456 | <!-- NEW PAGE --> | |
2457 | <h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippDeleteAttribute'>ippDeleteAttribute()</a></h3> | |
2458 | <h4>Description</h4> | |
ecdc0628 | 2459 | <p>Delete a single attribute in an IPP message. |
ef416fc2 | 2460 | |
2461 | </p> | |
2462 | <h4>Syntax</h4> | |
2463 | <pre> | |
2464 | void | |
2465 | ippDeleteAttribute( | |
2466 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
2467 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * attr); | |
2468 | </pre> | |
2469 | <h4>Arguments</h4> | |
2470 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2471 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2472 | <tbody> | |
ecdc0628 | 2473 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2474 | <tr><td><tt>attr</tt></td><td>Attribute to delete</td></tr> |
2475 | </tbody></table></div> | |
2476 | <h4>Returns</h4> | |
2477 | <p>Nothing.</p> | |
2478 | <!-- NEW PAGE --> | |
2479 | <h3 class='title'><a name='ippErrorString'>ippErrorString()</a></h3> | |
2480 | <h4>Description</h4> | |
2481 | <p>Return a name for the given status code.</p> | |
2482 | <h4>Syntax</h4> | |
2483 | <pre> | |
ecdc0628 | 2484 | const char * |
ef416fc2 | 2485 | ippErrorString( |
2486 | ipp_status_t error); | |
2487 | </pre> | |
2488 | <h4>Arguments</h4> | |
2489 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2490 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2491 | <tbody> | |
2492 | <tr><td><tt>error</tt></td><td>Error status</td></tr> | |
2493 | </tbody></table></div> | |
2494 | <h4>Returns</h4> | |
2495 | <p>Text string</p> | |
2496 | <!-- NEW PAGE --> | |
2497 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippErrorValue'>ippErrorValue()</a></h3> | |
2498 | <h4>Description</h4> | |
2499 | <p>Return a status code for the given name. | |
2500 | ||
2501 | </p> | |
2502 | <h4>Syntax</h4> | |
2503 | <pre> | |
2504 | ipp_status_t | |
2505 | ippErrorValue( | |
ecdc0628 | 2506 | const char * name); |
ef416fc2 | 2507 | </pre> |
2508 | <h4>Arguments</h4> | |
2509 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2510 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2511 | <tbody> | |
2512 | <tr><td><tt>name</tt></td><td>Name</td></tr> | |
2513 | </tbody></table></div> | |
2514 | <h4>Returns</h4> | |
2515 | <p>IPP status code</p> | |
2516 | <!-- NEW PAGE --> | |
2517 | <h3 class='title'><a name='ippFindAttribute'>ippFindAttribute()</a></h3> | |
2518 | <h4>Description</h4> | |
2519 | <p>Find a named attribute in a request...</p> | |
2520 | <h4>Syntax</h4> | |
2521 | <pre> | |
2522 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2523 | ippFindAttribute( | |
2524 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
ecdc0628 | 2525 | const char * name, |
ef416fc2 | 2526 | ipp_tag_t type); |
2527 | </pre> | |
2528 | <h4>Arguments</h4> | |
2529 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2530 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2531 | <tbody> | |
ecdc0628 | 2532 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2533 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> |
2534 | <tr><td><tt>type</tt></td><td>Type of attribute</td></tr> | |
2535 | </tbody></table></div> | |
2536 | <h4>Returns</h4> | |
2537 | <p>Matching attribute</p> | |
2538 | <!-- NEW PAGE --> | |
2539 | <h3 class='title'><a name='ippFindNextAttribute'>ippFindNextAttribute()</a></h3> | |
2540 | <h4>Description</h4> | |
2541 | <p>Find the next named attribute in a request...</p> | |
2542 | <h4>Syntax</h4> | |
2543 | <pre> | |
2544 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * | |
2545 | ippFindNextAttribute( | |
2546 | <a href='#ipp_t'>ipp_t</a> * ipp, | |
ecdc0628 | 2547 | const char * name, |
ef416fc2 | 2548 | ipp_tag_t type); |
2549 | </pre> | |
2550 | <h4>Arguments</h4> | |
2551 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2552 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2553 | <tbody> | |
ecdc0628 | 2554 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2555 | <tr><td><tt>name</tt></td><td>Name of attribute</td></tr> |
2556 | <tr><td><tt>type</tt></td><td>Type of attribute</td></tr> | |
2557 | </tbody></table></div> | |
2558 | <h4>Returns</h4> | |
2559 | <p>Matching attribute</p> | |
2560 | <!-- NEW PAGE --> | |
2561 | <h3 class='title'><a name='ippLength'>ippLength()</a></h3> | |
2562 | <h4>Description</h4> | |
ecdc0628 | 2563 | <p>Compute the length of an IPP message.</p> |
ef416fc2 | 2564 | <h4>Syntax</h4> |
2565 | <pre> | |
2566 | size_t | |
2567 | ippLength( | |
2568 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2569 | </pre> | |
2570 | <h4>Arguments</h4> | |
2571 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2572 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2573 | <tbody> | |
ecdc0628 | 2574 | <tr><td><tt>ipp</tt></td><td>IPP message</td></tr> |
ef416fc2 | 2575 | </tbody></table></div> |
2576 | <h4>Returns</h4> | |
ecdc0628 | 2577 | <p>Size of IPP message</p> |
ef416fc2 | 2578 | <!-- NEW PAGE --> |
2579 | <h3 class='title'><a name='ippNew'>ippNew()</a></h3> | |
2580 | <h4>Description</h4> | |
ecdc0628 | 2581 | <p>Allocate a new IPP message.</p> |
ef416fc2 | 2582 | <h4>Syntax</h4> |
2583 | <pre> | |
2584 | <a href='#ipp_t'>ipp_t</a> * | |
2585 | ippNew(void); | |
2586 | </pre> | |
2587 | <h4>Arguments</h4> | |
2588 | <p>None.</p> | |
2589 | <h4>Returns</h4> | |
ecdc0628 | 2590 | <p>New IPP message</p> |
2591 | <!-- NEW PAGE --> | |
2592 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippNewRequest'>ippNewRequest()</a></h3> | |
2593 | <h4>Description</h4> | |
2594 | <p>Allocate a new IPP request message. | |
2595 | ||
2596 | The new request message is initialized with the attributes-charset and | |
2597 | attributes-natural-language attributes added. The | |
2598 | attributes-natural-language value is derived from the current locale. | |
2599 | ||
2600 | </p> | |
2601 | <h4>Syntax</h4> | |
2602 | <pre> | |
2603 | <a href='#ipp_t'>ipp_t</a> * | |
2604 | ippNewRequest( | |
2605 | ipp_op_t op); | |
2606 | </pre> | |
2607 | <h4>Arguments</h4> | |
2608 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2609 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2610 | <tbody> | |
2611 | <tr><td><tt>op</tt></td><td>Operation code</td></tr> | |
2612 | </tbody></table></div> | |
2613 | <h4>Returns</h4> | |
2614 | <p>IPP request message</p> | |
ef416fc2 | 2615 | <!-- NEW PAGE --> |
2616 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippOpString'>ippOpString()</a></h3> | |
2617 | <h4>Description</h4> | |
2618 | <p>Return a name for the given operation id. | |
2619 | ||
2620 | </p> | |
2621 | <h4>Syntax</h4> | |
2622 | <pre> | |
ecdc0628 | 2623 | const char * |
ef416fc2 | 2624 | ippOpString( |
2625 | ipp_op_t op); | |
2626 | </pre> | |
2627 | <h4>Arguments</h4> | |
2628 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2629 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2630 | <tbody> | |
2631 | <tr><td><tt>op</tt></td><td>Operation ID</td></tr> | |
2632 | </tbody></table></div> | |
2633 | <h4>Returns</h4> | |
2634 | <p>Name</p> | |
2635 | <!-- NEW PAGE --> | |
2636 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippOpValue'>ippOpValue()</a></h3> | |
2637 | <h4>Description</h4> | |
2638 | <p>Return an operation id for the given name. | |
2639 | ||
2640 | </p> | |
2641 | <h4>Syntax</h4> | |
2642 | <pre> | |
2643 | ipp_op_t | |
2644 | ippOpValue( | |
ecdc0628 | 2645 | const char * name); |
ef416fc2 | 2646 | </pre> |
2647 | <h4>Arguments</h4> | |
2648 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2649 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2650 | <tbody> | |
2651 | <tr><td><tt>name</tt></td><td>Textual name</td></tr> | |
2652 | </tbody></table></div> | |
2653 | <h4>Returns</h4> | |
2654 | <p>Operation ID</p> | |
2655 | <!-- NEW PAGE --> | |
2656 | <h3 class='title'><a name='ippPort'>ippPort()</a></h3> | |
2657 | <h4>Description</h4> | |
2658 | <p>Return the default IPP port number.</p> | |
2659 | <h4>Syntax</h4> | |
2660 | <pre> | |
2661 | int | |
2662 | ippPort(void); | |
2663 | </pre> | |
2664 | <h4>Arguments</h4> | |
2665 | <p>None.</p> | |
2666 | <h4>Returns</h4> | |
2667 | <p>Port number</p> | |
2668 | <!-- NEW PAGE --> | |
2669 | <h3 class='title'><a name='ippRead'>ippRead()</a></h3> | |
2670 | <h4>Description</h4> | |
ecdc0628 | 2671 | <p>Read data for an IPP message from a HTTP connection.</p> |
ef416fc2 | 2672 | <h4>Syntax</h4> |
2673 | <pre> | |
2674 | ipp_state_t | |
2675 | ippRead( | |
2676 | <a href='#http_t'>http_t</a> * http, | |
2677 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2678 | </pre> | |
2679 | <h4>Arguments</h4> | |
2680 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2681 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2682 | <tbody> | |
2683 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
2684 | <tr><td><tt>ipp</tt></td><td>IPP data</td></tr> | |
2685 | </tbody></table></div> | |
2686 | <h4>Returns</h4> | |
2687 | <p>Current state</p> | |
2688 | <!-- NEW PAGE --> | |
2689 | <h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippReadFile'>ippReadFile()</a></h3> | |
2690 | <h4>Description</h4> | |
ecdc0628 | 2691 | <p>Read data for an IPP message from a file. |
ef416fc2 | 2692 | |
2693 | </p> | |
2694 | <h4>Syntax</h4> | |
2695 | <pre> | |
2696 | ipp_state_t | |
2697 | ippReadFile( | |
2698 | int fd, | |
2699 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2700 | </pre> | |
2701 | <h4>Arguments</h4> | |
2702 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2703 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2704 | <tbody> | |
2705 | <tr><td><tt>fd</tt></td><td>HTTP data</td></tr> | |
2706 | <tr><td><tt>ipp</tt></td><td>IPP data</td></tr> | |
2707 | </tbody></table></div> | |
2708 | <h4>Returns</h4> | |
2709 | <p>Current state</p> | |
2710 | <!-- NEW PAGE --> | |
ecdc0628 | 2711 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippReadIO'>ippReadIO()</a></h3> |
ef416fc2 | 2712 | <h4>Description</h4> |
ecdc0628 | 2713 | <p>Read data for an IPP message. |
ef416fc2 | 2714 | |
2715 | </p> | |
2716 | <h4>Syntax</h4> | |
2717 | <pre> | |
2718 | ipp_state_t | |
2719 | ippReadIO( | |
2720 | void * src, | |
2721 | <a href='#ipp_iocb_t'>ipp_iocb_t</a> cb, | |
2722 | int blocking, | |
2723 | <a href='#ipp_t'>ipp_t</a> * parent, | |
2724 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2725 | </pre> | |
2726 | <h4>Arguments</h4> | |
2727 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2728 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2729 | <tbody> | |
2730 | <tr><td><tt>src</tt></td><td>Data source</td></tr> | |
2731 | <tr><td><tt>cb</tt></td><td>Read callback function</td></tr> | |
2732 | <tr><td><tt>blocking</tt></td><td>Use blocking IO?</td></tr> | |
2733 | <tr><td><tt>parent</tt></td><td>Parent request, if any</td></tr> | |
2734 | <tr><td><tt>ipp</tt></td><td>IPP data</td></tr> | |
2735 | </tbody></table></div> | |
2736 | <h4>Returns</h4> | |
2737 | <p>Current state</p> | |
2738 | <!-- NEW PAGE --> | |
2739 | <h3 class='title'><a name='ippSetPort'>ippSetPort()</a></h3> | |
2740 | <h4>Description</h4> | |
2741 | <p>Set the default port number.</p> | |
2742 | <h4>Syntax</h4> | |
2743 | <pre> | |
2744 | void | |
2745 | ippSetPort( | |
2746 | int p); | |
2747 | </pre> | |
2748 | <h4>Arguments</h4> | |
2749 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2750 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2751 | <tbody> | |
2752 | <tr><td><tt>p</tt></td><td>Port number to use</td></tr> | |
2753 | </tbody></table></div> | |
2754 | <h4>Returns</h4> | |
2755 | <p>Nothing.</p> | |
2756 | <!-- NEW PAGE --> | |
2757 | <h3 class='title'><a name='ippTimeToDate'>ippTimeToDate()</a></h3> | |
2758 | <h4>Description</h4> | |
2759 | <p>Convert from UNIX time to RFC 1903 format.</p> | |
2760 | <h4>Syntax</h4> | |
2761 | <pre> | |
2762 | const <a href='#ipp_uchar_t'>ipp_uchar_t</a> * | |
2763 | ippTimeToDate( | |
2764 | time_t t); | |
2765 | </pre> | |
2766 | <h4>Arguments</h4> | |
2767 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2768 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2769 | <tbody> | |
2770 | <tr><td><tt>t</tt></td><td>UNIX time value</td></tr> | |
2771 | </tbody></table></div> | |
2772 | <h4>Returns</h4> | |
2773 | <p>RFC-1903 date/time data</p> | |
2774 | <!-- NEW PAGE --> | |
2775 | <h3 class='title'><a name='ippWrite'>ippWrite()</a></h3> | |
2776 | <h4>Description</h4> | |
ecdc0628 | 2777 | <p>Write data for an IPP message to a HTTP connection.</p> |
ef416fc2 | 2778 | <h4>Syntax</h4> |
2779 | <pre> | |
2780 | ipp_state_t | |
2781 | ippWrite( | |
2782 | <a href='#http_t'>http_t</a> * http, | |
2783 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2784 | </pre> | |
2785 | <h4>Arguments</h4> | |
2786 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2787 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2788 | <tbody> | |
2789 | <tr><td><tt>http</tt></td><td>HTTP connection</td></tr> | |
2790 | <tr><td><tt>ipp</tt></td><td>IPP data</td></tr> | |
2791 | </tbody></table></div> | |
2792 | <h4>Returns</h4> | |
2793 | <p>Current state</p> | |
2794 | <!-- NEW PAGE --> | |
2795 | <h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippWriteFile'>ippWriteFile()</a></h3> | |
2796 | <h4>Description</h4> | |
ecdc0628 | 2797 | <p>Write data for an IPP message to a file. |
ef416fc2 | 2798 | |
2799 | </p> | |
2800 | <h4>Syntax</h4> | |
2801 | <pre> | |
2802 | ipp_state_t | |
2803 | ippWriteFile( | |
2804 | int fd, | |
2805 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2806 | </pre> | |
2807 | <h4>Arguments</h4> | |
2808 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2809 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2810 | <tbody> | |
2811 | <tr><td><tt>fd</tt></td><td>HTTP data</td></tr> | |
2812 | <tr><td><tt>ipp</tt></td><td>IPP data</td></tr> | |
2813 | </tbody></table></div> | |
2814 | <h4>Returns</h4> | |
2815 | <p>Current state</p> | |
2816 | <!-- NEW PAGE --> | |
ecdc0628 | 2817 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippWriteIO'>ippWriteIO()</a></h3> |
ef416fc2 | 2818 | <h4>Description</h4> |
ecdc0628 | 2819 | <p>Write data for an IPP message. |
ef416fc2 | 2820 | |
2821 | </p> | |
2822 | <h4>Syntax</h4> | |
2823 | <pre> | |
2824 | ipp_state_t | |
2825 | ippWriteIO( | |
2826 | void * dst, | |
2827 | <a href='#ipp_iocb_t'>ipp_iocb_t</a> cb, | |
2828 | int blocking, | |
2829 | <a href='#ipp_t'>ipp_t</a> * parent, | |
2830 | <a href='#ipp_t'>ipp_t</a> * ipp); | |
2831 | </pre> | |
2832 | <h4>Arguments</h4> | |
2833 | <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'> | |
2834 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2835 | <tbody> | |
2836 | <tr><td><tt>dst</tt></td><td>Destination</td></tr> | |
2837 | <tr><td><tt>cb</tt></td><td>Write callback function</td></tr> | |
2838 | <tr><td><tt>blocking</tt></td><td>Use blocking IO?</td></tr> | |
ecdc0628 | 2839 | <tr><td><tt>parent</tt></td><td>Parent IPP message</td></tr> |
ef416fc2 | 2840 | <tr><td><tt>ipp</tt></td><td>IPP data</td></tr> |
2841 | </tbody></table></div> | |
2842 | <h4>Returns</h4> | |
2843 | <p>Current state</p> | |
2844 | <!-- NEW PAGE --> | |
2845 | <h2 class='title'><a name='STRUCTURES'>Structures</a></h2> | |
2846 | <ul> | |
ef416fc2 | 2847 | <li><a href='#http_addrlist_s'><tt>http_addrlist_s</tt></a> <span class='info'> CUPS 1.2 </span></li> |
ef416fc2 | 2848 | <li><a href='#ipp_attribute_s'><tt>ipp_attribute_s</tt></a> </li> |
ecdc0628 | 2849 | <li><a href='#ipp_s'><tt>ipp_s</tt></a> </li> |
ef416fc2 | 2850 | </ul> |
2851 | <!-- NEW PAGE --> | |
ef416fc2 | 2852 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='http_addrlist_s'>http_addrlist_s</a></h3> |
2853 | <h4>Description</h4> | |
2854 | <p>Socket address list, which is | |
2855 | used to enumerate all of the | |
2856 | addresses that are associated | |
2857 | with a hostname. </p> | |
2858 | <h4>Definition</h4> | |
2859 | <pre> | |
2860 | struct http_addrlist_s | |
2861 | { | |
2862 | <a href='#http_addr_t'>http_addr_t</a> addr; | |
2863 | struct <a href='#http_addrlist_s'>http_addrlist_s</a> * next; | |
2864 | }; | |
2865 | </pre> | |
2866 | <h4>Members</h4> | |
2867 | <div class='table'><table align='center' border='1' width='80%'> | |
2868 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2869 | <tbody> | |
2870 | <tr><td><tt>addr</tt> </td><td>Address</td></tr> | |
2871 | <tr><td><tt>next</tt> </td><td>Pointer to next address in list</td></tr> | |
2872 | </tbody></table></div> | |
2873 | <!-- NEW PAGE --> | |
ef416fc2 | 2874 | <h3 class='title'><a name='ipp_attribute_s'>ipp_attribute_s</a></h3> |
2875 | <h4>Description</h4> | |
2876 | <p>Attribute</p> | |
2877 | <h4>Definition</h4> | |
2878 | <pre> | |
2879 | struct ipp_attribute_s | |
2880 | { | |
ecdc0628 | 2881 | char * name; |
ef416fc2 | 2882 | struct <a href='#ipp_attribute_s'>ipp_attribute_s</a> * next; |
2883 | int num_values; | |
2884 | ipp_tag_t group_tag, value_tag; | |
2885 | <a href='#ipp_value_t'>ipp_value_t</a> values[1]; | |
2886 | }; | |
2887 | </pre> | |
2888 | <h4>Members</h4> | |
2889 | <div class='table'><table align='center' border='1' width='80%'> | |
2890 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2891 | <tbody> | |
2892 | <tr><td><tt>name</tt> </td><td>Name of attribute</td></tr> | |
2893 | <tr><td><tt>next</tt> </td><td>Next attribute in list</td></tr> | |
2894 | <tr><td><tt>num_values</tt> </td><td>Number of values</td></tr> | |
2895 | <tr><td><tt>value_tag</tt> </td><td>What type of value is it?</td></tr> | |
2896 | <tr><td><tt>values[1]</tt> </td><td>Values</td></tr> | |
2897 | </tbody></table></div> | |
2898 | <!-- NEW PAGE --> | |
ecdc0628 | 2899 | <h3 class='title'><a name='ipp_s'>ipp_s</a></h3> |
ef416fc2 | 2900 | <h4>Description</h4> |
2901 | <p>IPP Request/Response/Notification</p> | |
2902 | <h4>Definition</h4> | |
2903 | <pre> | |
ecdc0628 | 2904 | struct ipp_s |
ef416fc2 | 2905 | { |
ecdc0628 | 2906 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * attrs; |
2907 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * current; | |
ef416fc2 | 2908 | ipp_tag_t curtag; |
ecdc0628 | 2909 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * last; |
ef416fc2 | 2910 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> * prev; |
2911 | <a href='#ipp_request_t'>ipp_request_t</a> request; | |
2912 | ipp_state_t state; | |
2913 | }; | |
2914 | </pre> | |
2915 | <h4>Members</h4> | |
2916 | <div class='table'><table align='center' border='1' width='80%'> | |
2917 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
2918 | <tbody> | |
ecdc0628 | 2919 | <tr><td><tt>attrs</tt> </td><td>Attributes</td></tr> |
ef416fc2 | 2920 | <tr><td><tt>current</tt> </td><td>Current attribute (for read/write)</td></tr> |
2921 | <tr><td><tt>curtag</tt> </td><td>Current attribute group tag</td></tr> | |
ecdc0628 | 2922 | <tr><td><tt>last</tt> </td><td>Last attribute in list</td></tr> |
ef416fc2 | 2923 | <tr><td><tt>prev</tt> </td><td>Previous attribute (for read)</td></tr> |
2924 | <tr><td><tt>request</tt> </td><td>Request header</td></tr> | |
2925 | <tr><td><tt>state</tt> </td><td>State of request</td></tr> | |
2926 | </tbody></table></div> | |
2927 | <!-- NEW PAGE --> | |
2928 | <h2 class='title'><a name='TYPES'>Types</a></h2> | |
2929 | <ul> | |
ef416fc2 | 2930 | <li><a href='#http_addrlist_t'><tt>http_addrlist_t</tt></a> <span class='info'> CUPS 1.2 </span></li> |
2931 | <li><a href='#http_auth_t'><tt>http_auth_t</tt></a> </li> | |
2932 | <li><a href='#http_encoding_t'><tt>http_encoding_t</tt></a> </li> | |
2933 | <li><a href='#http_encryption_t'><tt>http_encryption_t</tt></a> </li> | |
2934 | <li><a href='#http_t'><tt>http_t</tt></a> </li> | |
2935 | <li><a href='#ipp_attribute_t'><tt>ipp_attribute_t</tt></a> </li> | |
ecdc0628 | 2936 | <li><a href='#ipp_iocb_t'><tt>ipp_iocb_t</tt></a> <span class='info'> CUPS 1.2 </span></li> |
ef416fc2 | 2937 | <li><a href='#ipp_request_t'><tt>ipp_request_t</tt></a> </li> |
2938 | <li><a href='#ipp_t'><tt>ipp_t</tt></a> </li> | |
ecdc0628 | 2939 | <li><a href='#ipp_uchar_t'><tt>ipp_uchar_t</tt></a> </li> |
ef416fc2 | 2940 | <li><a href='#ipp_value_t'><tt>ipp_value_t</tt></a> </li> |
2941 | </ul> | |
2942 | <!-- NEW PAGE --> | |
ef416fc2 | 2943 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='http_addrlist_t'>http_addrlist_t</a></h3> |
2944 | <h4>Description</h4> | |
2945 | <p>Socket address list, which is | |
2946 | used to enumerate all of the | |
2947 | addresses that are associated | |
2948 | with a hostname. </p> | |
2949 | <h4>Definition</h4> | |
2950 | <pre> | |
2951 | typedef struct <a href='#http_addrlist_s'>http_addrlist_s</a> / http_addrlist_t; | |
2952 | </pre> | |
2953 | <!-- NEW PAGE --> | |
2954 | <h3 class='title'><a name='http_auth_t'>http_auth_t</a></h3> | |
2955 | <h4>Description</h4> | |
2956 | <p>HTTP authentication types</p> | |
2957 | <h4>Definition</h4> | |
2958 | <pre> | |
2959 | typedef enum <a href='#http_auth_e'>http_auth_e</a> http_auth_t; | |
2960 | </pre> | |
2961 | <!-- NEW PAGE --> | |
2962 | <h3 class='title'><a name='http_encoding_t'>http_encoding_t</a></h3> | |
2963 | <h4>Description</h4> | |
2964 | <p>HTTP transfer encoding values</p> | |
2965 | <h4>Definition</h4> | |
2966 | <pre> | |
2967 | typedef enum <a href='#http_encoding_e'>http_encoding_e</a> http_encoding_t; | |
2968 | </pre> | |
2969 | <!-- NEW PAGE --> | |
2970 | <h3 class='title'><a name='http_encryption_t'>http_encryption_t</a></h3> | |
2971 | <h4>Description</h4> | |
2972 | <p>HTTP encryption values</p> | |
2973 | <h4>Definition</h4> | |
2974 | <pre> | |
2975 | typedef enum <a href='#http_encryption_e'>http_encryption_e</a> http_encryption_t; | |
2976 | </pre> | |
2977 | <!-- NEW PAGE --> | |
2978 | <h3 class='title'><a name='http_t'>http_t</a></h3> | |
2979 | <h4>Description</h4> | |
2980 | <p>HTTP connection structure.</p> | |
2981 | <h4>Definition</h4> | |
2982 | <pre> | |
ecdc0628 | 2983 | typedef struct _http_s http_t; |
ef416fc2 | 2984 | </pre> |
2985 | <!-- NEW PAGE --> | |
2986 | <h3 class='title'><a name='ipp_attribute_t'>ipp_attribute_t</a></h3> | |
2987 | <h4>Description</h4> | |
2988 | <p>Attribute</p> | |
2989 | <h4>Definition</h4> | |
2990 | <pre> | |
2991 | typedef struct <a href='#ipp_attribute_s'>ipp_attribute_s</a> ipp_attribute_t; | |
2992 | </pre> | |
2993 | <!-- NEW PAGE --> | |
ecdc0628 | 2994 | <h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ipp_iocb_t'>ipp_iocb_t</a></h3> |
ef416fc2 | 2995 | <h4>Description</h4> |
ecdc0628 | 2996 | <p>IPP IO Callback Function </p> |
ef416fc2 | 2997 | <h4>Definition</h4> |
2998 | <pre> | |
ecdc0628 | 2999 | typedef ssize_t (*ipp_iocb_t)(void *, <a href='#ipp_uchar_t'>ipp_uchar_t</a> *, size_t); |
ef416fc2 | 3000 | </pre> |
3001 | <!-- NEW PAGE --> | |
3002 | <h3 class='title'><a name='ipp_request_t'>ipp_request_t</a></h3> | |
3003 | <h4>Description</h4> | |
3004 | <p>Request Header</p> | |
3005 | <h4>Definition</h4> | |
3006 | <pre> | |
ecdc0628 | 3007 | typedef union <a href='#ipp_request_u'>ipp_request_u</a> ipp_request_t; |
ef416fc2 | 3008 | </pre> |
3009 | <!-- NEW PAGE --> | |
3010 | <h3 class='title'><a name='ipp_t'>ipp_t</a></h3> | |
3011 | <h4>Description</h4> | |
3012 | <p>Attribute Value</p> | |
3013 | <h4>Definition</h4> | |
3014 | <pre> | |
ecdc0628 | 3015 | typedef struct <a href='#ipp_s'>ipp_s</a> ipp_t; |
3016 | </pre> | |
3017 | <!-- NEW PAGE --> | |
3018 | <h3 class='title'><a name='ipp_uchar_t'>ipp_uchar_t</a></h3> | |
3019 | <h4>Description</h4> | |
3020 | <p>IPP status codes...</p> | |
3021 | <h4>Definition</h4> | |
3022 | <pre> | |
3023 | typedef typedef unsigned char ipp_uchar_t; | |
ef416fc2 | 3024 | </pre> |
3025 | <!-- NEW PAGE --> | |
3026 | <h3 class='title'><a name='ipp_value_t'>ipp_value_t</a></h3> | |
3027 | <h4>Description</h4> | |
3028 | <p>New in CUPS 1.1.19</p> | |
3029 | <h4>Definition</h4> | |
3030 | <pre> | |
ecdc0628 | 3031 | typedef union <a href='#ipp_value_u'>ipp_value_u</a> ipp_value_t; |
3032 | </pre> | |
3033 | <!-- NEW PAGE --> | |
3034 | <h2 class='title'><a name='UNIONS'>Unions</a></h2> | |
3035 | <ul> | |
3036 | <li><a href='#ipp_request_u'><tt>ipp_request_u</tt></a> </li> | |
3037 | <li><a href='#ipp_value_u'><tt>ipp_value_u</tt></a> </li> | |
3038 | </ul> | |
3039 | <!-- NEW PAGE --> | |
3040 | <h3 class='title'><a name='ipp_request_u'>ipp_request_u</a></h3> | |
3041 | <h4>Description</h4> | |
3042 | <p>Request Header</p> | |
3043 | <h4>Definition</h4> | |
3044 | <pre> | |
3045 | union ipp_request_u | |
3046 | { | |
3047 | }; | |
3048 | </pre> | |
3049 | <h4>Members</h4> | |
3050 | <div class='table'><table align='center' border='1' width='80%'> | |
3051 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
3052 | <tbody> | |
3053 | </tbody></table></div> | |
3054 | <!-- NEW PAGE --> | |
3055 | <h3 class='title'><a name='ipp_value_u'>ipp_value_u</a></h3> | |
3056 | <h4>Description</h4> | |
3057 | <p>New in CUPS 1.1.19</p> | |
3058 | <h4>Definition</h4> | |
3059 | <pre> | |
3060 | union ipp_value_u | |
3061 | { | |
3062 | char boolean; | |
3063 | <a href='#ipp_t'>ipp_t</a> * collection; | |
3064 | <a href='#ipp_uchar_t'>ipp_uchar_t</a> date[11]; | |
3065 | int integer; | |
3066 | }; | |
ef416fc2 | 3067 | </pre> |
ecdc0628 | 3068 | <h4>Members</h4> |
3069 | <div class='table'><table align='center' border='1' width='80%'> | |
3070 | <thead><tr><th>Name</th><th>Description</th></tr></thead> | |
3071 | <tbody> | |
3072 | <tr><td><tt>boolean</tt> </td><td>Boolean value</td></tr> | |
3073 | <tr><td><tt>collection</tt> </td><td>Collection value</td></tr> | |
3074 | <tr><td><tt>date[11]</tt> </td><td>Date/time value</td></tr> | |
3075 | <tr><td><tt>integer</tt> </td><td>Integer/enumerated value</td></tr> | |
3076 | </tbody></table></div> | |
ef416fc2 | 3077 | </body> |
3078 | </html> |