add onShown eventlist for executing stuff after the screen is drawn
[enigma2.git] / lib / service / servicemp3.h
index b443d6e..bf18e92 100644 (file)
@@ -3,9 +3,11 @@
 
 #include <lib/service/iservice.h>
 
-class eServiceFactoryMP3: public virtual iServiceHandler, public virtual iObject
+class eStaticServiceMP3Info;
+
+class eServiceFactoryMP3: public iServiceHandler
 {
-DECLARE_REF;
+DECLARE_REF(eServiceFactoryMP3);
 public:
        eServiceFactoryMP3();
        virtual ~eServiceFactoryMP3();
@@ -15,11 +17,25 @@ public:
        RESULT play(const eServiceReference &, ePtr<iPlayableService> &ptr);
        RESULT record(const eServiceReference &, ePtr<iRecordableService> &ptr);
        RESULT list(const eServiceReference &, ePtr<iListableService> &ptr);
+       RESULT info(const eServiceReference &, ePtr<iStaticServiceInformation> &ptr);
+       RESULT offlineOperations(const eServiceReference &, ePtr<iServiceOfflineOperations> &ptr);
+private:
+       ePtr<eStaticServiceMP3Info> m_service_info;
+};
+
+class eStaticServiceMP3Info: public iStaticServiceInformation
+{
+       DECLARE_REF(eStaticServiceMP3Info);
+       friend class eServiceFactoryMP3;
+       eStaticServiceMP3Info();
+public:
+       RESULT getName(const eServiceReference &ref, std::string &name);
+       int getLength(const eServiceReference &ref);
 };
 
-class eServiceMP3: public virtual iPlayableService, public virtual iPauseableService, public virtual iObject, public Object
+class eServiceMP3: public iPlayableService, public iPauseableService, public iServiceInformation, public Object
 {
-DECLARE_REF;
+DECLARE_REF(eServiceMP3);
 private:
        friend class eServiceFactoryMP3;
        std::string filename;
@@ -39,13 +55,18 @@ public:
        RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
        RESULT start();
        RESULT stop();
-       RESULT getIPausableService(ePtr<iPauseableService> &ptr);
+       RESULT pause(ePtr<iPauseableService> &ptr);
+       RESULT seek(ePtr<iSeekableService> &ptr);
+       RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr);
 
                // iPausableService
        RESULT pause();
        RESULT unpause();
        
-       RESULT getIServiceInformation(ePtr<iServiceInformation>&);
+       RESULT info(ePtr<iServiceInformation>&);
+       
+               // iServiceInformation
+       RESULT getName(std::string &name);
 };
 
 #endif