aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update/Editor.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-31 22:17:49 +0100
committerMax Kellermann <max@duempel.org>2014-01-31 22:17:49 +0100
commit26970579b86c4dfb8e7a11cbc12edac670e4f0e2 (patch)
tree4f859ab8b534fb3d2fc637624cc4c412797a1efd /src/db/update/Editor.cxx
parent04b4f534889719fd822aff5cf9b78a50d1da47ad (diff)
downloadmpd-26970579b86c4dfb8e7a11cbc12edac670e4f0e2.tar.gz
mpd-26970579b86c4dfb8e7a11cbc12edac670e4f0e2.tar.xz
mpd-26970579b86c4dfb8e7a11cbc12edac670e4f0e2.zip
db/update/Editor: add locking method variants
Diffstat (limited to 'src/db/update/Editor.cxx')
-rw-r--r--src/db/update/Editor.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/db/update/Editor.cxx b/src/db/update/Editor.cxx
index 369bad24b..c8f58931f 100644
--- a/src/db/update/Editor.cxx
+++ b/src/db/update/Editor.cxx
@@ -47,6 +47,14 @@ DatabaseEditor::DeleteSong(Directory &dir, Song *del)
db_lock();
}
+void
+DatabaseEditor::LockDeleteSong(Directory &parent, Song *song)
+{
+ db_lock();
+ DeleteSong(parent, song);
+ db_unlock();
+}
+
/**
* Recursively remove all sub directories and songs from a directory,
* leaving an empty directory.
@@ -77,6 +85,14 @@ DatabaseEditor::DeleteDirectory(Directory *directory)
directory->Delete();
}
+void
+DatabaseEditor::LockDeleteDirectory(Directory *directory)
+{
+ db_lock();
+ DeleteDirectory(directory);
+ db_unlock();
+}
+
bool
DatabaseEditor::DeleteNameIn(Directory &parent, const char *name)
{