summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/Registry.cpp9
-rw-r--r--src/core/Registry.hpp5
2 files changed, 14 insertions, 0 deletions
diff --git a/src/core/Registry.cpp b/src/core/Registry.cpp
index c42a97a..88babb7 100644
--- a/src/core/Registry.cpp
+++ b/src/core/Registry.cpp
@@ -74,6 +74,15 @@ void Registry::registerExtension(const std::string &extension,
extensions[ext] = mimetype;
}
+void Registry::registerDefaultExtensions()
+{
+ registerExtension("oxd", "text/vnd.ousia.oxd");
+ registerExtension("oxm", "text/vnd.ousia.oxm");
+ registerExtension("opd", "text/vnd.ousia.opd");
+ registerExtension("oss", "text/vnd.ousia.oss");
+ registerExtension("js", "application/javascript");
+}
+
std::string Registry::getMimetypeForExtension(
const std::string &extension) const
{
diff --git a/src/core/Registry.hpp b/src/core/Registry.hpp
index 965f336..f932480 100644
--- a/src/core/Registry.hpp
+++ b/src/core/Registry.hpp
@@ -106,6 +106,11 @@ public:
const std::string &mimetype);
/**
+ * Registers mimetypes for some default extensions.
+ */
+ void registerDefaultExtensions();
+
+ /**
* Returns the mimetype for the given extension.
*
* @param extension is the file extension for which the mimetype should be