summaryrefslogtreecommitdiff
path: root/plugins/static/mime.h
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2019-11-24 00:04:06 +0100
committertomsmeding <tom.smeding@gmail.com>2019-11-24 00:20:37 +0100
commit4216b9b8737b2bad9689b721b9e238456c0d4053 (patch)
tree5c42eba37db19f433524ac6a9c1da6ac6a8274f3 /plugins/static/mime.h
parentc04fbe3df564c66b0f4261a4013ea349ab41418c (diff)
static: MIME type detection using 'xdg-mime' or 'file'
Diffstat (limited to 'plugins/static/mime.h')
-rw-r--r--plugins/static/mime.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/static/mime.h b/plugins/static/mime.h
new file mode 100644
index 0000000..c3641b5
--- /dev/null
+++ b/plugins/static/mime.h
@@ -0,0 +1,10 @@
+#pragma once
+
+
+// Must be called at least once in the application, and those calls must not be
+// simultaneous (because this function is not thread-safe itself).
+void mime_init();
+
+// Returns pointer to internal buffer, don't free
+// This function is thread-safe.
+const char* mime_detect(const char *path);