From 7b003f8aaafc2d95dcf7c9dfc5cbc6288b37915c Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Thu, 12 Jul 2007 19:10:34 +0000 Subject: - Update to the mootools framework. - New more XHTML compliant tips. - Optional AJAX enabled infoboxes for epg information. - Major speed enhancement for the single pages, due to less data to transfer to the browser. - See doc/ChangeLog for more detailed changes description. - See doc/dev-conventions.txt for how we benefit from mootools package on the ECMAScript side of live. --- recordings.h | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'recordings.h') diff --git a/recordings.h b/recordings.h index 9e42ada..81b971f 100644 --- a/recordings.h +++ b/recordings.h @@ -10,8 +10,8 @@ namespace vdrlive { // Forward declations from epg_events.h - class EpgEvent; - typedef std::tr1::shared_ptr EpgEventPtr; + class EpgInfo; + typedef std::tr1::shared_ptr EpgInfoPtr; class RecordingsManager; typedef std::tr1::shared_ptr RecordingsManagerPtr; @@ -33,6 +33,21 @@ namespace vdrlive { */ const cRecording* GetByMd5Hash(const std::string& hash) const; + /** + * Determine wether the recording has been archived on + * removable media (e.g. DVD-ROM) + */ + static bool IsArchived(const cRecording* recording); + + /** + * Provide an identification of the removable media + * (e.g. DVD-ROM Number or Name) where the recording has + * been archived. + */ + static const std::string GetArchiveId(const cRecording* recording); + + static const std::string GetArchiveDescr(const cRecording* recording); + private: RecordingsManager(); @@ -58,10 +73,8 @@ namespace vdrlive { virtual time_t StartTime() const = 0; virtual bool IsDir() const = 0; - virtual bool IsArchived() const = 0; virtual const std::string& Name() const { return m_name; } virtual const std::string Id() const = 0; - virtual const std::string ArchiveId() const = 0; virtual const cRecording* Recording() const { return 0; } virtual const cRecordingInfo* RecInfo() const { return 0; } @@ -84,9 +97,7 @@ namespace vdrlive { virtual time_t StartTime() const { return 0; } virtual bool IsDir() const { return true; } - virtual bool IsArchived() const { return false; } virtual const std::string Id() const { std::string e; return e; } - virtual const std::string ArchiveId() const { std::string e; return e; } private: int m_level; @@ -95,21 +106,19 @@ namespace vdrlive { class RecordingsItemRec : public RecordingsItem { public: - RecordingsItemRec(const std::string& id, const std::string& name, cRecording* recording); + RecordingsItemRec(const std::string& id, const std::string& name, const cRecording* recording); virtual ~RecordingsItemRec(); virtual time_t StartTime() const; virtual bool IsDir() const { return false; } - virtual bool IsArchived() const ; virtual const std::string Id() const { return m_id; } - virtual const std::string ArchiveId() const; virtual const cRecording* Recording() const { return m_recording; } virtual const cRecordingInfo* RecInfo() const { return m_recording->Info(); } private: - cRecording *m_recording; + const cRecording *m_recording; std::string m_id; }; @@ -122,8 +131,6 @@ namespace vdrlive { int MaxLevel() const { return m_maxLevel; } - static EpgEventPtr CreateEpgEvent(const RecordingsItemPtr recItem); - private: int m_maxLevel; RecordingsItemPtr m_root; -- cgit v1.2.3