X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/32e4324b9b5e615a84885b9132505e4706ededfe..f9f5c691fbbff5d5393d46b05c299f38a6afdfc3:/lib/service/servicedvb.h diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h index 57dca9a0..e99faffd 100644 --- a/lib/service/servicedvb.h +++ b/lib/service/servicedvb.h @@ -25,7 +25,9 @@ private: RESULT lookupService(ePtr &ptr, const eServiceReference &ref); }; -class eDVBServiceList: public iListableService +class eBouquet; + +class eDVBServiceList: public iListableService, public iMutableServiceList { DECLARE_REF(eDVBServiceList); public: @@ -33,17 +35,78 @@ public: RESULT getContent(std::list &list); RESULT getNext(eServiceReference &ptr); int compareLessEqual(const eServiceReference &a, const eServiceReference &b); + + RESULT startEdit(ePtr &); + RESULT flushChanges(); + RESULT addService(eServiceReference &ref); + RESULT removeService(eServiceReference &ref); + RESULT moveService(eServiceReference &ref, int pos); private: RESULT startQuery(); eServiceReference m_parent; friend class eServiceFactoryDVB; eDVBServiceList(const eServiceReference &parent); ePtr m_query; + + /* for editing purposes. WARNING: lifetime issue! */ + eBouquet *m_bouquet; }; -class eDVBServicePlay: public iPlayableService, iSeekableService, public Object, public iServiceInformation +class eDVBServicePlay: public iPlayableService, public iPauseableService, + public iSeekableService, public Object, public iServiceInformation, + public iAudioTrackSelection, public iFrontendStatusInformation, + public iSubserviceList, public iTimeshiftService { DECLARE_REF(eDVBServicePlay); +public: + virtual ~eDVBServicePlay(); + + // iPlayableService + RESULT connectEvent(const Slot2 &event, ePtr &connection); + RESULT start(); + RESULT stop(); + RESULT seek(ePtr &ptr); + RESULT pause(ePtr &ptr); + RESULT info(ePtr &ptr); + RESULT audioTracks(ePtr &ptr); + RESULT frontendStatusInfo(ePtr &ptr); + RESULT subServices(ePtr &ptr); + RESULT timeshift(ePtr &ptr); + + // iPauseableService + RESULT pause(); + RESULT unpause(); + RESULT setSlowMotion(int ratio); + RESULT setFastForward(int ratio); + + // 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 &evt, int nownext); + int getInfo(int w); + std::string getInfoString(int w); + + // iAudioTrackSelection + int getNumberOfTracks(); + RESULT selectTrack(unsigned int i); + RESULT getTrackInfo(struct iAudioTrackInfo &, unsigned int n); + + // iFrontendStatusInformation + int getFrontendInfo(int w); + + // iSubserviceList + int getNumberOfSubservices(); + RESULT getSubservice(eServiceReference &subservice, unsigned int n); + + // iTimeshiftService + RESULT startTimeshift(); + RESULT stopTimeshift(); + private: friend class eServiceFactoryDVB; eServiceReference m_reference; @@ -62,26 +125,10 @@ private: void serviceEvent(int event); Signal2 m_event; - int m_is_pvr; -public: - virtual ~eDVBServicePlay(); - - // iPlayableService - RESULT connectEvent(const Slot2 &event, ePtr &connection); - RESULT start(); - RESULT stop(); - RESULT seek(ePtr &ptr); - RESULT pause(ePtr &ptr); - RESULT info(ePtr &ptr); + int m_is_pvr, m_is_paused, m_timeshift_enabled; - // iSeekableService - RESULT getLength(pts_t &len); - RESULT seekTo(pts_t to); - RESULT getPlayPosition(pts_t &pos); - - // iServiceInformation - RESULT getName(std::string &name); - RESULT getEvent(ePtr &evt, int nownext); + int m_current_audio_stream; + int selectAudioStream(int n); }; #endif