42 static const char *mimeMap[][2] = {
43 {
"application/bz2",
".bz2" },
44 {
"application/gnunet-directory",
".gnd" },
45 {
"application/java",
".class" },
46 {
"application/msword",
".doc" },
47 {
"application/nar",
".nar" },
48 {
"application/narinfo",
".narinfo" },
49 {
"application/ogg",
".ogg" },
50 {
"application/pdf",
".pdf" },
51 {
"application/pgp-keys",
".key" },
52 {
"application/pgp-signature",
".pgp" },
53 {
"application/postscript",
".ps" },
54 {
"application/rar",
".rar" },
55 {
"application/rtf",
".rtf" },
56 {
"application/xml",
".xml" },
57 {
"application/x-debian-package",
".deb" },
58 {
"application/x-dvi",
".dvi" },
59 {
"application/x-flac",
".flac" },
60 {
"application/x-gzip",
".gz" },
61 {
"application/x-java-archive",
".jar" },
62 {
"application/x-java-vm",
".class" },
63 {
"application/x-python-code",
".pyc" },
64 {
"application/x-redhat-package-manager",
".rpm" },
65 {
"application/x-rpm",
".rpm" },
66 {
"application/x-tar",
".tar" },
67 {
"application/x-tex-pk",
".pk" },
68 {
"application/x-texinfo",
".texinfo" },
69 {
"application/x-xcf",
".xcf" },
70 {
"application/x-xfig",
".xfig" },
71 {
"application/zip",
".zip" },
73 {
"audio/midi",
".midi" },
74 {
"audio/mpeg",
".mp3" },
75 {
"audio/real",
".rm" },
76 {
"audio/x-wav",
".wav" },
78 {
"image/gif",
".gif" },
79 {
"image/jpeg",
".jpg" },
80 {
"image/pcx",
".pcx" },
81 {
"image/png",
".png" },
82 {
"image/tiff",
".tiff" },
83 {
"image/x-ms-bmp",
".bmp" },
84 {
"image/x-xpixmap",
".xpm" },
86 {
"text/css",
".css" },
87 {
"text/html",
".html" },
88 {
"text/plain",
".txt" },
89 {
"text/rtf",
".rtf" },
90 {
"text/x-c++hdr",
".h++" },
91 {
"text/x-c++src",
".c++" },
92 {
"text/x-chdr",
".h" },
93 {
"text/x-csrc",
".c" },
94 {
"text/x-java",
".java" },
95 {
"text/x-moc",
".moc" },
96 {
"text/x-pascal",
".pas" },
97 {
"text/x-perl",
".pl" },
98 {
"text/x-python",
".py" },
99 {
"text/x-tex",
".tex" },
101 {
"video/avi",
".avi" },
102 {
"video/mpeg",
".mpeg" },
103 {
"video/quicktime",
".qt" },
104 {
"video/real",
".rm" },
105 {
"video/x-msvideo",
".avi" },
125 while ((mimeMap[i][0] != NULL) && (0 != strcmp (mime, mimeMap[i][0])))
127 if (mimeMap[i][1] == NULL)
129 _ (
"Did not find mime type `%s' in extension list.\n"), mime);
136 EXTRACTOR_METATYPE_TITLE,
137 EXTRACTOR_METATYPE_BOOK_TITLE,
138 EXTRACTOR_METATYPE_ORIGINAL_TITLE,
139 EXTRACTOR_METATYPE_PACKAGE_NAME,
140 EXTRACTOR_METATYPE_URL,
141 EXTRACTOR_METATYPE_URI,
142 EXTRACTOR_METATYPE_DESCRIPTION,
143 EXTRACTOR_METATYPE_ISRC,
144 EXTRACTOR_METATYPE_JOURNAL_NAME,
145 EXTRACTOR_METATYPE_AUTHOR_NAME,
146 EXTRACTOR_METATYPE_SUBJECT,
147 EXTRACTOR_METATYPE_ALBUM,
148 EXTRACTOR_METATYPE_ARTIST,
149 EXTRACTOR_METATYPE_KEYWORDS,
150 EXTRACTOR_METATYPE_COMMENT,
151 EXTRACTOR_METATYPE_UNKNOWN,
153 if ((base == NULL) && (ext == NULL))
shared definitions for the FS library
static int ret
Final status code.
API for file sharing via GNUnet.
#define EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME
char * GNUNET_FS_meta_data_suggest_filename(const struct GNUNET_FS_MetaData *md)
Suggest a filename based on given metadata.
#define GNUNET_log(kind,...)
@ GNUNET_ERROR_TYPE_DEBUG
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_free(ptr)
Wrapper around free.