summaryrefslogtreecommitdiff
path: root/indra/newview/llmimetypes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmimetypes.cpp')
-rw-r--r--indra/newview/llmimetypes.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp
index bfbc81aa66..525e89cdff 100644
--- a/indra/newview/llmimetypes.cpp
+++ b/indra/newview/llmimetypes.cpp
@@ -46,6 +46,8 @@ std::string sDefaultWidgetType;
// Returned when we don't know what widget set to use
std::string sDefaultImpl;
// Returned when we don't know what impl to use
+std::string sXMLFilename;
+ // Squirrel away XML filename so we know how to reset
/////////////////////////////////////////////////////////////////////////////
@@ -146,6 +148,8 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename)
sWidgetMap[set_name] = info;
}
}
+
+ sXMLFilename = xml_filename;
return true;
}
@@ -267,3 +271,23 @@ bool LLMIMETypes::findAllowLooping(const std::string& mime_type)
}
return allow_looping;
}
+
+// static
+bool LLMIMETypes::isTypeHandled(const std::string& mime_type)
+{
+ mime_info_map_t::const_iterator it = sMap.find(mime_type);
+ if (it != sMap.end())
+ {
+ return true;
+ }
+ return false;
+}
+
+// static
+void LLMIMETypes::reload(void*)
+{
+ sMap.clear();
+ sWidgetMap.clear();
+ (void)LLMIMETypes::parseMIMETypes(sXMLFilename);
+}
+