From ba52f3f4823faf9c73e9445770a44887f3c2b389 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Fri, 23 Jan 2015 00:31:07 +0100 Subject: Added mimetype by filename lookup to registry --- src/core/Registry.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/Registry.hpp') diff --git a/src/core/Registry.hpp b/src/core/Registry.hpp index f932480..4b4cb65 100644 --- a/src/core/Registry.hpp +++ b/src/core/Registry.hpp @@ -120,6 +120,15 @@ public: */ std::string getMimetypeForExtension(const std::string &extension) const; + /** + * Tries to deduce the mimetype from the given filename. + * + * @param filename is the filename from which the mimetype should be + * deduced. + * @return the mimetype or an empty string if no filename could be deduced. + */ + std::string getMimetypeForFilename(const std::string &filename) const; + /** * Registers a ResourceLocator instance that should be used for locating * resources. Two registered ResourceLocator should not be capable of -- cgit v1.2.3