+ extensions.erase(id);
+ return 0;
+}
+
+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());
+}
+
+ /* default handlers */
+RESULT iServiceHandler::info(const eServiceReference &, ePtr<iStaticServiceInformation> &ptr)
+{
+ ptr = 0;
+ return -1;
+}
+
+#include <lib/service/event.h>
+
+RESULT iStaticServiceInformation::getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &evt, time_t start_time)
+{
+ evt = 0;
+ return -1;
+}
+
+int iStaticServiceInformation::getLength(const eServiceReference &ref)
+{
+ return -1;
+}
+
+int iStaticServiceInformation::isPlayable(const eServiceReference &ref, const eServiceReference &ignore, bool simulate)
+{