+RESULT eServiceCenter::addFactoryExtension(int id, const char *extension)
+{
+ std::map<int, std::list<std::string> >::iterator it = extensions.find(id);
+ if (it == extensions.end())
+ return -1;
+ it->second.push_back(extension);
+ return 0;
+}
+
+RESULT eServiceCenter::removeFactoryExtension(int id, const char *extension)
+{
+ std::map<int, std::list<std::string> >::iterator it = extensions.find(id);
+ if (it == extensions.end())
+ return -1;
+ it->second.remove(extension);
+ return 0;
+}
+
+
+int eServiceCenter::getServiceTypeForExtension(const char *str)
+{
+ for (std::map<int, std::list<std::string> >::iterator sit(extensions.begin()); sit != extensions.end(); ++sit)
+ {
+ for (std::list<std::string>::iterator eit(sit->second.begin()); eit != sit->second.end(); ++eit)
+ {
+ if (*eit == str)
+ return sit->first;
+ }
+ }
+ return -1;
+}
+
+int eServiceCenter::getServiceTypeForExtension(const std::string &str)
+{
+ return getServiceTypeForExtension(str.c_str());
+}
+