]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-mime.html
Merge changes from CUPS 1.4svn-r8606.
[thirdparty/cups.git] / doc / help / api-mime.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- SECTION: Programming -->
4 <head>
5 <title>MIME API</title>
6 <meta name="keywords" content="Programming">
7 <meta name="creator" content="Mini-XML v2.6">
8 <style type="text/css"><!--
9 BODY {
10 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
11 }
12
13 H1, H2, H3, H4, H5, H6, P, TD, TH {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
15 }
16
17 KBD {
18 font-family: monaco, courier, monospace;
19 font-weight: bold;
20 }
21
22 PRE {
23 font-family: monaco, courier, monospace;
24 }
25
26 PRE.command {
27 margin-left: 36pt;
28 }
29
30 P.compact {
31 margin: 0;
32 }
33
34 P.example {
35 font-style: italic;
36 margin-left: 36pt;
37 }
38
39 PRE.example {
40 background: #eeeeee;
41 border: dotted thin #999999;
42 margin-left: 36pt;
43 padding: 10px;
44 }
45
46 PRE.command EM, PRE.example EM {
47 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
48 }
49
50 P.command {
51 font-family: monaco, courier, monospace;
52 margin-left: 36pt;
53 }
54
55 P.formula {
56 font-style: italic;
57 margin-left: 36pt;
58 }
59
60 BLOCKQUOTE {
61 background: #cccccc;
62 border: solid thin #999999;
63 padding: 10pt;
64 }
65
66 A IMG {
67 border: none;
68 }
69
70 A:link:hover IMG {
71 background: #f0f0f0;
72 border-radius: 10px;
73 -moz-border-radius: 10px;
74 }
75
76 A:link, A:visited {
77 font-weight: normal;
78 text-decoration: none;
79 }
80
81 A:link:hover, A:visited:hover, A:active {
82 text-decoration: underline;
83 }
84
85 SUB, SUP {
86 font-size: 50%;
87 }
88
89 TR.data, TD.data, TR.data TD {
90 margin-top: 10pt;
91 padding: 5pt;
92 border-bottom: solid 1pt #999999;
93 }
94
95 TR.data TH {
96 border-bottom: solid 1pt #999999;
97 padding-top: 10pt;
98 padding-left: 5pt;
99 text-align: left;
100 }
101
102 DIV.table TABLE {
103 border: solid thin #999999;
104 border-collapse: collapse;
105 border-spacing: 0;
106 margin-left: auto;
107 margin-right: auto;
108 }
109
110 DIV.table CAPTION {
111 caption-side: top;
112 font-size: 120%;
113 font-style: italic;
114 font-weight: bold;
115 margin-left: auto;
116 margin-right: auto;
117 }
118
119 DIV.table TABLE TD {
120 border: solid thin #cccccc;
121 padding-top: 5pt;
122 }
123
124 DIV.table TABLE TH {
125 background: #cccccc;
126 border: none;
127 border-bottom: solid thin #999999;
128 }
129
130 DIV.figure TABLE {
131 margin-left: auto;
132 margin-right: auto;
133 }
134
135 DIV.figure CAPTION {
136 caption-side: bottom;
137 font-size: 120%;
138 font-style: italic;
139 font-weight: bold;
140 margin-left: auto;
141 margin-right: auto;
142 }
143
144 TH.label {
145 text-align: right;
146 vertical-align: top;
147 }
148
149 TH.sublabel {
150 text-align: right;
151 font-weight: normal;
152 }
153
154 HR {
155 border: solid thin;
156 }
157
158 SPAN.info {
159 background: black;
160 border: thin solid black;
161 color: white;
162 font-size: 80%;
163 font-style: italic;
164 font-weight: bold;
165 white-space: nowrap;
166 }
167
168 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
169 float: right;
170 font-size: 100%;
171 }
172
173 H2.title, H3.title {
174 border-bottom: solid 2pt #000000;
175 }
176
177 DIV.indent, TABLE.indent {
178 margin-top: 2em;
179 margin-left: auto;
180 margin-right: auto;
181 width: 90%;
182 }
183
184 TABLE.indent {
185 border-collapse: collapse;
186 }
187
188 TABLE.indent TD, TABLE.indent TH {
189 padding: 0;
190 }
191
192 TABLE.list {
193 border-collapse: collapse;
194 margin-left: auto;
195 margin-right: auto;
196 width: 90%;
197 }
198
199 TABLE.list TH {
200 background: white;
201 border-bottom: solid thin #cccccc;
202 color: #444444;
203 padding-top: 10pt;
204 padding-left: 5pt;
205 text-align: left;
206 vertical-align: bottom;
207 white-space: nowrap;
208 }
209
210 TABLE.list TH A {
211 color: #4444cc;
212 }
213
214 TABLE.list TD {
215 border-bottom: solid thin #eeeeee;
216 padding-top: 5pt;
217 padding-left: 5pt;
218 }
219
220 TABLE.list TR:nth-child(even) {
221 background: #f8f8f8;
222 }
223
224 TABLE.list TR:nth-child(odd) {
225 background: #f4f4f4;
226 }
227
228 DT {
229 margin-left: 36pt;
230 margin-top: 12pt;
231 }
232
233 DD {
234 margin-left: 54pt;
235 }
236
237 DL.category DT {
238 font-weight: bold;
239 }
240
241 P.summary {
242 margin-left: 36pt;
243 font-family: monaco, courier, monospace;
244 }
245
246 DIV.summary TABLE {
247 border: solid thin #999999;
248 border-collapse: collapse;
249 border-spacing: 0;
250 margin: 10px;
251 }
252
253 DIV.summary TABLE TD, DIV.summary TABLE TH {
254 border: solid thin #999999;
255 padding: 5px;
256 text-align: left;
257 vertical-align: top;
258 }
259
260 DIV.summary TABLE THEAD TH {
261 background: #eeeeee;
262 }
263
264 /* API documentation styles... */
265 div.body h1 {
266 margin: 0;
267 }
268 div.body h2 {
269 margin-top: 1.5em;
270 }
271 div.body h3, div.body h4, div.body h5 {
272 margin-bottom: 0.5em;
273 margin-top: 1.5em;
274 }
275 .class, .enumeration, .function, .struct, .typedef, .union {
276 border-bottom: solid thin #999999;
277 margin-bottom: 0;
278 margin-top: 2em;
279 }
280 .description {
281 margin-top: 0.5em;
282 }
283 code, p.code, pre, ul.code li {
284 font-family: monaco, courier, monospace;
285 font-size: 90%;
286 }
287 ul.code, ul.contents, ul.subcontents {
288 list-style-type: none;
289 margin: 0;
290 padding-left: 0;
291 }
292 ul.code li {
293 margin: 0;
294 }
295 ul.contents > li {
296 margin-top: 1em;
297 }
298 ul.contents li ul.code, ul.contents li ul.subcontents {
299 padding-left: 2em;
300 }
301 div.body dl {
302 margin-left: 0;
303 margin-top: 0;
304 }
305 div.body dt {
306 font-style: italic;
307 margin-left: 0;
308 margin-top: 0;
309 }
310 div.body dd {
311 margin-bottom: 0.5em;
312 }
313
314 /* This is just for the HTML files generated with the framedhelp target */
315 div.contents {
316 background: #e8e8e8;
317 border: solid thin black;
318 padding: 10px;
319 }
320 div.contents h1 {
321 font-size: 110%;
322 }
323 div.contents h2 {
324 font-size: 100%;
325 }
326 div.contents ul.contents {
327 font-size: 80%;
328 }
329 div.contents ul.subcontents li {
330 margin-left: 1em;
331 text-indent: -1em;
332 }
333 --></style>
334 </head>
335 <body>
336 <div class='body'>
337 <h2 class="title">Contents</h2>
338 <ul class="contents">
339 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
340 <li><a href="#mimeAddFilter" title="Add a filter to the current MIME database.">mimeAddFilter</a></li>
341 <li><a href="#mimeAddType" title="Add a MIME type to a database.">mimeAddType</a></li>
342 <li><a href="#mimeAddTypeRule" title="Add a detection rule for a file type.">mimeAddTypeRule</a></li>
343 <li><a href="#mimeDelete" title="Delete (free) a MIME database.">mimeDelete</a></li>
344 <li><a href="#mimeDeleteFilter" title="Delete a filter from the MIME database.">mimeDeleteFilter</a></li>
345 <li><a href="#mimeDeleteType" title="Delete a type from the MIME database.">mimeDeleteType</a></li>
346 <li><a href="#mimeFileType" title="Determine the type of a file.">mimeFileType</a></li>
347 <li><a href="#mimeFilter" title="Find the fastest way to convert from one type to another.">mimeFilter</a></li>
348 <li><a href="#mimeFilterLookup" title="Lookup a filter...">mimeFilterLookup</a></li>
349 <li><a href="#mimeFirstFilter" title="Get the first filter in the MIME database.">mimeFirstFilter</a></li>
350 <li><a href="#mimeFirstType" title="Get the first type in the MIME database.">mimeFirstType</a></li>
351 <li><a href="#mimeLoad" title="Create a new MIME database from disk.">mimeLoad</a></li>
352 <li><a href="#mimeLoadFilters" title="Load filter definitions from disk.">mimeLoadFilters</a></li>
353 <li><a href="#mimeLoadTypes" title="Load type definitions from disk.">mimeLoadTypes</a></li>
354 <li><a href="#mimeNextFilter" title="Get the next filter in the MIME database.">mimeNextFilter</a></li>
355 <li><a href="#mimeNextType" title="Get the next type in the MIME database.">mimeNextType</a></li>
356 <li><a href="#mimeNumFilters" title="MIME database">mimeNumFilters</a></li>
357 <li><a href="#mimeNumTypes" title="MIME database">mimeNumTypes</a></li>
358 <li><a href="#mimeType" title="Lookup a file type.">mimeType</a></li>
359 </ul></li>
360 <li><a href="#TYPES">Data Types</a><ul class="code">
361 <li><a href="#mime_filter_t" title="MIME Conversion Filter Data">mime_filter_t</a></li>
362 <li><a href="#mime_magic_t" title="MIME Magic Data">mime_magic_t</a></li>
363 <li><a href="#mime_op_t" title="Types/structures...">mime_op_t</a></li>
364 <li><a href="#mime_t" title="MIME Database">mime_t</a></li>
365 <li><a href="#mime_type_t" title="MIME Type Data">mime_type_t</a></li>
366 </ul></li>
367 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
368 <h3 class="function"><a name="mimeAddFilter">mimeAddFilter</a></h3>
369 <p class="description">Add a filter to the current MIME database.</p>
370 <p class="code">
371 <a href="#mime_filter_t">mime_filter_t</a> *mimeAddFilter (<br>
372 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
373 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_type_t">mime_type_t</a> *src,<br>
374 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_type_t">mime_type_t</a> *dst,<br>
375 &nbsp;&nbsp;&nbsp;&nbsp;int cost,<br>
376 &nbsp;&nbsp;&nbsp;&nbsp;const char *filter<br>
377 );</p>
378 <h4 class="parameters">Parameters</h4>
379 <dl>
380 <dt>mime</dt>
381 <dd class="description">MIME database</dd>
382 <dt>src</dt>
383 <dd class="description">Source type</dd>
384 <dt>dst</dt>
385 <dd class="description">Destination type</dd>
386 <dt>cost</dt>
387 <dd class="description">Relative time/resource cost</dd>
388 <dt>filter</dt>
389 <dd class="description">Filter program to run</dd>
390 </dl>
391 <h4 class="returnvalue">Return Value</h4>
392 <p class="description">New filter</p>
393 <h3 class="function"><a name="mimeAddType">mimeAddType</a></h3>
394 <p class="description">Add a MIME type to a database.</p>
395 <p class="code">
396 <a href="#mime_type_t">mime_type_t</a> *mimeAddType (<br>
397 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
398 &nbsp;&nbsp;&nbsp;&nbsp;const char *super,<br>
399 &nbsp;&nbsp;&nbsp;&nbsp;const char *type<br>
400 );</p>
401 <h4 class="parameters">Parameters</h4>
402 <dl>
403 <dt>mime</dt>
404 <dd class="description">MIME database</dd>
405 <dt>super</dt>
406 <dd class="description">Super-type name</dd>
407 <dt>type</dt>
408 <dd class="description">Type name</dd>
409 </dl>
410 <h4 class="returnvalue">Return Value</h4>
411 <p class="description">New (or existing) MIME type</p>
412 <h3 class="function"><a name="mimeAddTypeRule">mimeAddTypeRule</a></h3>
413 <p class="description">Add a detection rule for a file type.</p>
414 <p class="code">
415 int mimeAddTypeRule (<br>
416 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_type_t">mime_type_t</a> *mt,<br>
417 &nbsp;&nbsp;&nbsp;&nbsp;const char *rule<br>
418 );</p>
419 <h4 class="parameters">Parameters</h4>
420 <dl>
421 <dt>mt</dt>
422 <dd class="description">Type to add to</dd>
423 <dt>rule</dt>
424 <dd class="description">Rule to add</dd>
425 </dl>
426 <h4 class="returnvalue">Return Value</h4>
427 <p class="description">0 on success, -1 on failure</p>
428 <h3 class="function"><a name="mimeDelete">mimeDelete</a></h3>
429 <p class="description">Delete (free) a MIME database.</p>
430 <p class="code">
431 void mimeDelete (<br>
432 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime<br>
433 );</p>
434 <h4 class="parameters">Parameters</h4>
435 <dl>
436 <dt>mime</dt>
437 <dd class="description">MIME database</dd>
438 </dl>
439 <h3 class="function"><a name="mimeDeleteFilter">mimeDeleteFilter</a></h3>
440 <p class="description">Delete a filter from the MIME database.</p>
441 <p class="code">
442 void mimeDeleteFilter (<br>
443 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
444 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_filter_t">mime_filter_t</a> *filter<br>
445 );</p>
446 <h4 class="parameters">Parameters</h4>
447 <dl>
448 <dt>mime</dt>
449 <dd class="description">MIME database</dd>
450 <dt>filter</dt>
451 <dd class="description">Filter</dd>
452 </dl>
453 <h3 class="function"><a name="mimeDeleteType">mimeDeleteType</a></h3>
454 <p class="description">Delete a type from the MIME database.</p>
455 <p class="code">
456 void mimeDeleteType (<br>
457 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
458 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_type_t">mime_type_t</a> *mt<br>
459 );</p>
460 <h4 class="parameters">Parameters</h4>
461 <dl>
462 <dt>mime</dt>
463 <dd class="description">MIME database</dd>
464 <dt>mt</dt>
465 <dd class="description">Type</dd>
466 </dl>
467 <h3 class="function"><a name="mimeFileType">mimeFileType</a></h3>
468 <p class="description">Determine the type of a file.</p>
469 <p class="code">
470 <a href="#mime_type_t">mime_type_t</a> *mimeFileType (<br>
471 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
472 &nbsp;&nbsp;&nbsp;&nbsp;const char *pathname,<br>
473 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename,<br>
474 &nbsp;&nbsp;&nbsp;&nbsp;int *compression<br>
475 );</p>
476 <h4 class="parameters">Parameters</h4>
477 <dl>
478 <dt>mime</dt>
479 <dd class="description">MIME database</dd>
480 <dt>pathname</dt>
481 <dd class="description">Name of file to check on disk</dd>
482 <dt>filename</dt>
483 <dd class="description">Original filename or NULL</dd>
484 <dt>compression</dt>
485 <dd class="description">Is the file compressed?</dd>
486 </dl>
487 <h4 class="returnvalue">Return Value</h4>
488 <p class="description">Type of file</p>
489 <h3 class="function"><a name="mimeFilter">mimeFilter</a></h3>
490 <p class="description">Find the fastest way to convert from one type to another.</p>
491 <p class="code">
492 cups_array_t *mimeFilter (<br>
493 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
494 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_type_t">mime_type_t</a> *src,<br>
495 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_type_t">mime_type_t</a> *dst,<br>
496 &nbsp;&nbsp;&nbsp;&nbsp;int *cost<br>
497 );</p>
498 <h4 class="parameters">Parameters</h4>
499 <dl>
500 <dt>mime</dt>
501 <dd class="description">MIME database</dd>
502 <dt>src</dt>
503 <dd class="description">Source file type</dd>
504 <dt>dst</dt>
505 <dd class="description">Destination file type</dd>
506 <dt>cost</dt>
507 <dd class="description">Cost of filters</dd>
508 </dl>
509 <h4 class="returnvalue">Return Value</h4>
510 <p class="description">Array of filters to run</p>
511 <h3 class="function"><a name="mimeFilterLookup">mimeFilterLookup</a></h3>
512 <p class="description">Lookup a filter...</p>
513 <p class="code">
514 <a href="#mime_filter_t">mime_filter_t</a> *mimeFilterLookup (<br>
515 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
516 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_type_t">mime_type_t</a> *src,<br>
517 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_type_t">mime_type_t</a> *dst<br>
518 );</p>
519 <h4 class="parameters">Parameters</h4>
520 <dl>
521 <dt>mime</dt>
522 <dd class="description">MIME database</dd>
523 <dt>src</dt>
524 <dd class="description">Source type</dd>
525 <dt>dst</dt>
526 <dd class="description">Destination type</dd>
527 </dl>
528 <h4 class="returnvalue">Return Value</h4>
529 <p class="description">Filter for src-&gt;dst</p>
530 <h3 class="function"><a name="mimeFirstFilter">mimeFirstFilter</a></h3>
531 <p class="description">Get the first filter in the MIME database.</p>
532 <p class="code">
533 <a href="#mime_filter_t">mime_filter_t</a> *mimeFirstFilter (<br>
534 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime<br>
535 );</p>
536 <h4 class="parameters">Parameters</h4>
537 <dl>
538 <dt>mime</dt>
539 <dd class="description">MIME database</dd>
540 </dl>
541 <h4 class="returnvalue">Return Value</h4>
542 <p class="description">Filter or NULL</p>
543 <h3 class="function"><a name="mimeFirstType">mimeFirstType</a></h3>
544 <p class="description">Get the first type in the MIME database.</p>
545 <p class="code">
546 <a href="#mime_type_t">mime_type_t</a> *mimeFirstType (<br>
547 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime<br>
548 );</p>
549 <h4 class="parameters">Parameters</h4>
550 <dl>
551 <dt>mime</dt>
552 <dd class="description">MIME database</dd>
553 </dl>
554 <h4 class="returnvalue">Return Value</h4>
555 <p class="description">Type or NULL</p>
556 <h3 class="function"><a name="mimeLoad">mimeLoad</a></h3>
557 <p class="description">Create a new MIME database from disk.</p>
558 <p class="code">
559 <a href="#mime_t">mime_t</a> *mimeLoad (<br>
560 &nbsp;&nbsp;&nbsp;&nbsp;const char *pathname,<br>
561 &nbsp;&nbsp;&nbsp;&nbsp;const char *filterpath<br>
562 );</p>
563 <h4 class="parameters">Parameters</h4>
564 <dl>
565 <dt>pathname</dt>
566 <dd class="description">Directory to load</dd>
567 <dt>filterpath</dt>
568 <dd class="description">Directory to load</dd>
569 </dl>
570 <h4 class="returnvalue">Return Value</h4>
571 <p class="description">New MIME database</p>
572 <h4 class="discussion">Discussion</h4>
573 <p class="discussion">This function uses <a href="#mimeLoadFilters"><code>mimeLoadFilters</code></a> and <a href="#mimeLoadTypes"><code>mimeLoadTypes</code></a> to
574 create a MIME database from a single directory.</p>
575 <h3 class="function"><a name="mimeLoadFilters">mimeLoadFilters</a></h3>
576 <p class="description">Load filter definitions from disk.</p>
577 <p class="code">
578 <a href="#mime_t">mime_t</a> *mimeLoadFilters (<br>
579 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
580 &nbsp;&nbsp;&nbsp;&nbsp;const char *pathname,<br>
581 &nbsp;&nbsp;&nbsp;&nbsp;const char *filterpath<br>
582 );</p>
583 <h4 class="parameters">Parameters</h4>
584 <dl>
585 <dt>mime</dt>
586 <dd class="description">MIME database</dd>
587 <dt>pathname</dt>
588 <dd class="description">Directory to load from</dd>
589 <dt>filterpath</dt>
590 <dd class="description">Default filter program directory</dd>
591 </dl>
592 <h4 class="returnvalue">Return Value</h4>
593 <p class="description">MIME database</p>
594 <h4 class="discussion">Discussion</h4>
595 <p class="discussion">This function loads all of the .convs files from the specified directory.
596 Use <a href="#mimeLoadTypes"><code>mimeLoadTypes</code></a> to load all types before you load the filters.</p>
597 <h3 class="function"><a name="mimeLoadTypes">mimeLoadTypes</a></h3>
598 <p class="description">Load type definitions from disk.</p>
599 <p class="code">
600 <a href="#mime_t">mime_t</a> *mimeLoadTypes (<br>
601 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
602 &nbsp;&nbsp;&nbsp;&nbsp;const char *pathname<br>
603 );</p>
604 <h4 class="parameters">Parameters</h4>
605 <dl>
606 <dt>mime</dt>
607 <dd class="description">MIME database or <code>NULL</code> to create a new one</dd>
608 <dt>pathname</dt>
609 <dd class="description">Directory to load from</dd>
610 </dl>
611 <h4 class="returnvalue">Return Value</h4>
612 <p class="description">MIME database</p>
613 <h4 class="discussion">Discussion</h4>
614 <p class="discussion">This function loads all of the .types files from the specified directory.
615 Use <a href="#mimeLoadFilters"><code>mimeLoadFilters</code></a> to load all filters after you load the types.</p>
616 <h3 class="function"><a name="mimeNextFilter">mimeNextFilter</a></h3>
617 <p class="description">Get the next filter in the MIME database.</p>
618 <p class="code">
619 <a href="#mime_filter_t">mime_filter_t</a> *mimeNextFilter (<br>
620 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime<br>
621 );</p>
622 <h4 class="parameters">Parameters</h4>
623 <dl>
624 <dt>mime</dt>
625 <dd class="description">MIME database</dd>
626 </dl>
627 <h4 class="returnvalue">Return Value</h4>
628 <p class="description">Filter or NULL</p>
629 <h3 class="function"><a name="mimeNextType">mimeNextType</a></h3>
630 <p class="description">Get the next type in the MIME database.</p>
631 <p class="code">
632 <a href="#mime_type_t">mime_type_t</a> *mimeNextType (<br>
633 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime<br>
634 );</p>
635 <h4 class="parameters">Parameters</h4>
636 <dl>
637 <dt>mime</dt>
638 <dd class="description">MIME database</dd>
639 </dl>
640 <h4 class="returnvalue">Return Value</h4>
641 <p class="description">Type or NULL</p>
642 <h3 class="function"><a name="mimeNumFilters">mimeNumFilters</a></h3>
643 <p class="description">MIME database</p>
644 <p class="code">
645 int mimeNumFilters (<br>
646 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime<br>
647 );</p>
648 <h4 class="parameters">Parameters</h4>
649 <dl>
650 <dt>mime</dt>
651 <dd class="description">MIME database</dd>
652 </dl>
653 <h4 class="returnvalue">Return Value</h4>
654 <p class="description">Get the number of filters in a MIME database.</p>
655 <h3 class="function"><a name="mimeNumTypes">mimeNumTypes</a></h3>
656 <p class="description">MIME database</p>
657 <p class="code">
658 int mimeNumTypes (<br>
659 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime<br>
660 );</p>
661 <h4 class="parameters">Parameters</h4>
662 <dl>
663 <dt>mime</dt>
664 <dd class="description">MIME database</dd>
665 </dl>
666 <h4 class="returnvalue">Return Value</h4>
667 <p class="description">Get the number of types in a MIME database.</p>
668 <h3 class="function"><a name="mimeType">mimeType</a></h3>
669 <p class="description">Lookup a file type.</p>
670 <p class="code">
671 <a href="#mime_type_t">mime_type_t</a> *mimeType (<br>
672 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#mime_t">mime_t</a> *mime,<br>
673 &nbsp;&nbsp;&nbsp;&nbsp;const char *super,<br>
674 &nbsp;&nbsp;&nbsp;&nbsp;const char *type<br>
675 );</p>
676 <h4 class="parameters">Parameters</h4>
677 <dl>
678 <dt>mime</dt>
679 <dd class="description">MIME database</dd>
680 <dt>super</dt>
681 <dd class="description">Super-type name</dd>
682 <dt>type</dt>
683 <dd class="description">Type name</dd>
684 </dl>
685 <h4 class="returnvalue">Return Value</h4>
686 <p class="description">Matching file type definition</p>
687 <h2 class="title"><a name="TYPES">Data Types</a></h2>
688 <h3 class="typedef"><a name="mime_filter_t">mime_filter_t</a></h3>
689 <p class="description">MIME Conversion Filter Data</p>
690 <p class="code">
691 typedef struct _mime_filter_s mime_filter_t;
692 </p>
693 <h3 class="typedef"><a name="mime_magic_t">mime_magic_t</a></h3>
694 <p class="description">MIME Magic Data</p>
695 <p class="code">
696 typedef struct _mime_magic_s mime_magic_t;
697 </p>
698 <h3 class="typedef"><a name="mime_op_t">mime_op_t</a></h3>
699 <p class="description">Types/structures...</p>
700 <p class="code">
701 typedef enum mime_op_t;
702 </p>
703 <h3 class="typedef"><a name="mime_t">mime_t</a></h3>
704 <p class="description">MIME Database</p>
705 <p class="code">
706 typedef struct _mime_s mime_t;
707 </p>
708 <h3 class="typedef"><a name="mime_type_t">mime_type_t</a></h3>
709 <p class="description">MIME Type Data</p>
710 <p class="code">
711 typedef struct _mime_type_s mime_type_t;
712 </p>
713 </div>
714 </body>
715 </html>