add SeekRelative stuff
[enigma2.git] / lib / service / servicedvb.h
index 7844415..9ebd277 100644 (file)
@@ -20,6 +20,7 @@ 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);
 };
@@ -27,19 +28,47 @@ private:
 class eDVBServiceList: public iListableService
 {
 DECLARE_REF(eDVBServiceList);
-private:
-       eServiceReference m_parent;
-       friend class eServiceFactoryDVB;
-       eDVBServiceList(const eServiceReference &parent);
 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);
+       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;
@@ -58,20 +87,7 @@ private:
        void serviceEvent(int event);
        Signal2<void,iPlayableService*,int> m_event;
        
-       int m_is_pvr;
-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(std::string &name);
-       RESULT getEvent(ePtr<eServiceEvent> &evt, int nownext);
+       int m_is_pvr, m_is_paused;
 };
 
 #endif