add SeekRelative stuff
[enigma2.git] / lib / service / servicedvb.h
index 5dd2f3b..9ebd277 100644 (file)
@@ -20,51 +20,74 @@ public:
        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:
+       RESULT lookupService(ePtr<eDVBService> &ptr, const eServiceReference &ref);
 };
 
 class eDVBServiceList: public iListableService
 {
 DECLARE_REF(eDVBServiceList);
+public:
+       virtual ~eDVBServiceList();
+       RESULT getContent(std::list<eServiceReference> &list);
+       RESULT getNext(eServiceReference &ptr);
+       int compareLessEqual(const eServiceReference &a, const eServiceReference &b);
 private:
+       RESULT startQuery();
        eServiceReference m_parent;
        friend class eServiceFactoryDVB;
        eDVBServiceList(const eServiceReference &parent);
-public:
-       virtual ~eDVBServiceList();
-       RESULT getContent(std::list<eServiceReference> &list);
+       ePtr<iDVBChannelListQuery> m_query;
 };
 
-class eDVBServicePlay: public iPlayableService, public Object, public iServiceInformation
+class eDVBServicePlay: public iPlayableService, public iPauseableService, public iSeekableService, public Object, public iServiceInformation
 {
 DECLARE_REF(eDVBServicePlay);
+public:
+       virtual ~eDVBServicePlay();
+
+               // iPlayableService
+       RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
+       RESULT start();
+       RESULT stop();
+       RESULT seek(ePtr<iSeekableService> &ptr);
+       RESULT pause(ePtr<iPauseableService> &ptr);
+       RESULT info(ePtr<iServiceInformation> &ptr);
+       
+               // iPauseableService
+       RESULT pause();
+       RESULT unpause();
+       
+               // iSeekableService
+       RESULT getLength(pts_t &len);
+       RESULT seekTo(pts_t to);
+       RESULT seekRelative(int direction, pts_t to);
+       RESULT getPlayPosition(pts_t &pos);
+
+               // iServiceInformation
+       RESULT getName(std::string &name);
+       RESULT getEvent(ePtr<eServiceEvent> &evt, int nownext);
+
 private:
        friend class eServiceFactoryDVB;
        eServiceReference m_reference;
        
+       ePtr<eDVBService> m_dvb_service;
+       
        ePtr<iTSMPEGDecoder> m_decoder;
        
        eDVBServicePMTHandler m_service_handler;
        eDVBServiceEITHandler m_event_handler;
        
-       eDVBServicePlay(const eServiceReference &ref);
+       eDVBServicePlay(const eServiceReference &ref, eDVBService *service);
        
        void gotNewEvent();
        
        void serviceEvent(int event);
        Signal2<void,iPlayableService*,int> m_event;
-public:
-       virtual ~eDVBServicePlay();
-
-               // iPlayableService
-       RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
-       RESULT start();
-       RESULT stop();
-       RESULT pause(ePtr<iPauseableService> &ptr);
-       RESULT info(ePtr<iServiceInformation> &ptr);
        
-               // iServiceInformation
-       RESULT getName(const eServiceReference &ref, std::string &name);
-       RESULT getEvent(ePtr<eServiceEvent> &evt, int nownext);
+       int m_is_pvr, m_is_paused;
 };
 
 #endif