diff options
author | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2008-01-25 01:09:49 +0100 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2008-01-25 01:09:49 +0100 |
commit | 5c5da204386e7a63ed4fac1d458dd10a120470e0 (patch) | |
tree | deb3e5f385ddeee6c1746714859fb1de09177299 /recman.h | |
parent | e2496312144175ba6fc030eb9f8f9781590f5e6b (diff) | |
download | vdr-plugin-live-5c5da204386e7a63ed4fac1d458dd10a120470e0.tar.gz vdr-plugin-live-5c5da204386e7a63ed4fac1d458dd10a120470e0.tar.bz2 |
Fixed bug that the recordings items were not deleted when the tree was
rebuild. This was because of the non weak references to the parent
items.
Deleting of recordings can be triggered now. It still needs some
tweaking on the visual feedback. And possibly a 'undelete' option for
the last deleted recording.
Diffstat (limited to 'recman.h')
-rw-r--r-- | recman.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -25,7 +25,7 @@ namespace vdrlive { typedef std::tr1::shared_ptr< RecordingsManager > RecordingsManagerPtr; typedef std::tr1::shared_ptr< RecordingsItem > RecordingsItemPtr; - // typedef std::tr1::weak_ptr< RecordingsItem > RecordingsItemWeakPtr; + typedef std::tr1::weak_ptr< RecordingsItem > RecordingsItemWeakPtr; typedef std::multimap< std::string, RecordingsItemPtr > RecordingsMap; @@ -69,6 +69,12 @@ namespace vdrlive { cRecording const* GetByMd5Hash(std::string const & hash) const; /** + * Delete a recording with the given hash according to + * VDRs recording deletion mechanisms. + */ + void DeleteRecording(cRecording const * recording) const; + + /** * Determine wether the recording has been archived on * removable media (e.g. DVD-ROM) */ @@ -127,7 +133,7 @@ namespace vdrlive { private: std::string m_name; RecordingsMap m_entries; - RecordingsItemPtr m_parent; + RecordingsItemWeakPtr m_parent; }; @@ -217,6 +223,7 @@ namespace vdrlive { RecordingsTreePtr(RecordingsManagerPtr recManPtr, std::tr1::shared_ptr< RecordingsTree > recTree); public: + RecordingsTreePtr(); virtual ~RecordingsTreePtr(); private: |