Revision 15497,
885 bytes
checked in by ghudson, 24 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r15496,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | #ifndef __GNOME_VFS_MIME_MAGIC_H__ |
---|
2 | #define __GNOME_VFS_MIME_MAGIC_H__ |
---|
3 | |
---|
4 | #include <glib.h> |
---|
5 | |
---|
6 | #ifdef __cplusplus |
---|
7 | extern "C" { |
---|
8 | #endif /*__cplusplus*/ |
---|
9 | |
---|
10 | /* Used internally by the magic code, exposes the parsing to users */ |
---|
11 | typedef enum { |
---|
12 | T_END, /* end of array */ |
---|
13 | T_BYTE, |
---|
14 | T_SHORT, |
---|
15 | T_LONG, |
---|
16 | T_STR, |
---|
17 | T_DATE, |
---|
18 | T_BESHORT, |
---|
19 | T_BELONG, |
---|
20 | T_BEDATE, |
---|
21 | T_LESHORT, |
---|
22 | T_LELONG, |
---|
23 | T_LEDATE |
---|
24 | } GnomeMagicType; |
---|
25 | |
---|
26 | typedef struct _GnomeMagicEntry { |
---|
27 | GnomeMagicType type; |
---|
28 | guint16 range_start, range_end; |
---|
29 | |
---|
30 | guint16 pattern_length; |
---|
31 | gboolean use_mask; |
---|
32 | char pattern [48]; |
---|
33 | char mask [48]; |
---|
34 | |
---|
35 | char mimetype[48]; |
---|
36 | } GnomeMagicEntry; |
---|
37 | |
---|
38 | GnomeMagicEntry *gnome_vfs_mime_magic_parse (const gchar *filename, gint *nents); |
---|
39 | |
---|
40 | /* testing calls */ |
---|
41 | GnomeMagicEntry *gnome_vfs_mime_test_get_magic_table (const char *table_path); |
---|
42 | void gnome_vfs_mime_dump_magic_table (void); |
---|
43 | |
---|
44 | #ifdef __cplusplus |
---|
45 | } |
---|
46 | #endif /*__cplusplus*/ |
---|
47 | |
---|
48 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.