summaryrefslogtreecommitdiff
path: root/recman.h
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-01-25 01:09:49 +0100
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-01-25 01:09:49 +0100
commit5c5da204386e7a63ed4fac1d458dd10a120470e0 (patch)
treedeb3e5f385ddeee6c1746714859fb1de09177299 /recman.h
parente2496312144175ba6fc030eb9f8f9781590f5e6b (diff)
downloadvdr-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.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/recman.h b/recman.h
index 0f8b8c5..45265b3 100644
--- a/recman.h
+++ b/recman.h
@@ -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: