]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/mime.h
Merge changes from CUPS 1.4svn-r7874.
[thirdparty/cups.git] / scheduler / mime.h
index 7ccaa70e13e795eb9c0f1c17df894de4eb19861d..019496495b17946c227fa93add94cfda677ced91 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id: mime.h 5061 2006-02-03 16:32:18Z mike $"
+ * "$Id: mime.h 7694 2008-06-26 00:23:20Z mike $"
  *
  *   MIME type/conversion database definitions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  */
 
 #ifndef _CUPS_MIME_H_
@@ -34,9 +25,9 @@
  * C++ magic...
  */
 
-#  ifdef _cplusplus
+#  ifdef __cplusplus
 extern "C" {
-#  endif /* _cplusplus */
+#  endif /* __cplusplus */
 
 
 /*
@@ -95,6 +86,7 @@ typedef struct _mime_magic_s          /**** MIME Magic Data ****/
 typedef struct _mime_type_s            /**** MIME Type Data ****/
 {
   mime_magic_t *rules;                 /* Rules used to detect this type */
+  int          priority;               /* Priority of this type */
   char         super[MIME_MAX_SUPER],  /* Super-type name ("image", "application", etc.) */
                type[MIME_MAX_TYPE];    /* Type name ("png", "postscript", etc.) */
 } mime_type_t;
@@ -111,6 +103,7 @@ typedef struct _mime_s                      /**** MIME Database ****/
 {
   cups_array_t *types;                 /* File types */
   cups_array_t *filters;               /* Type conversion filters */
+  cups_array_t *srcs;                  /* Filters sorted by source type */
 } mime_t;
 
 
@@ -120,9 +113,9 @@ typedef struct _mime_s                      /**** MIME Database ****/
 
 extern void            mimeDelete(mime_t *mime);
 extern mime_t          *mimeLoad(const char *pathname, const char *filterpath);
-extern mime_t          *mimeMerge(mime_t *mime, const char *pathname,
-                                  const char *filterpath);
-extern mime_t          *mimeNew(void);
+extern mime_t          *mimeLoadFilters(mime_t *mime, const char *pathname,
+                                        const char *filterpath);
+extern mime_t          *mimeLoadTypes(mime_t *mime, const char *pathname);
 
 extern mime_type_t     *mimeAddType(mime_t *mime, const char *super,
                                     const char *type);
@@ -142,15 +135,17 @@ extern mime_filter_t      *mimeAddFilter(mime_t *mime, mime_type_t *src,
 extern void            mimeDeleteFilter(mime_t *mime, mime_filter_t *filter);
 extern cups_array_t    *mimeFilter(mime_t *mime, mime_type_t *src,
                                    mime_type_t *dst, int *cost);
+extern mime_filter_t   *mimeFilterLookup(mime_t *mime, mime_type_t *src,
+                                         mime_type_t *dst);
 extern mime_filter_t   *mimeFirstFilter(mime_t *mime);
 extern mime_filter_t   *mimeNextFilter(mime_t *mime);
 extern int             mimeNumFilters(mime_t *mime);
 
-#  ifdef _cplusplus
+#  ifdef __cplusplus
 }
-#  endif /* _cplusplus */
+#  endif /* __cplusplus */
 #endif /* !_CUPS_MIME_H_ */
 
 /*
- * End of "$Id: mime.h 5061 2006-02-03 16:32:18Z mike $".
+ * End of "$Id: mime.h 7694 2008-06-26 00:23:20Z mike $".
  */