5 #include <lib/base/object.h>
6 #include <lib/service/iservice.h>
11 typedef ePtr<eServiceCenter> eServiceCenterPtr;
14 class eServiceCenter: public iServiceHandler
16 DECLARE_REF(eServiceCenter);
17 std::map<int,ePtr<iServiceHandler> > handler;
18 std::map<int,std::list<std::string> > extensions;
19 static eServiceCenter *instance;
27 virtual ~eServiceCenter();
29 int getServiceTypeForExtension(const char *str);
30 int getServiceTypeForExtension(const std::string &str);
33 RESULT play(const eServiceReference &, ePtr<iPlayableService> &ptr);
34 RESULT record(const eServiceReference &, ePtr<iRecordableService> &ptr);
35 RESULT list(const eServiceReference &, ePtr<iListableService> &ptr);
36 RESULT info(const eServiceReference &, ePtr<iStaticServiceInformation> &ptr);
37 RESULT offlineOperations(const eServiceReference &, ePtr<iServiceOfflineOperations> &ptr);
40 static RESULT getPrivInstance(ePtr<eServiceCenter> &ptr) { ptr = instance; return 0; }
41 RESULT addServiceFactory(int id, iServiceHandler *hnd, std::list<std::string> &extensions);
42 RESULT removeServiceFactory(int id);
44 static SWIG_VOID(RESULT) getInstance(ePtr<iServiceHandler> &SWIG_NAMED_OUTPUT(ptr)) { ptr = instance; return 0; }