aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateArchive.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-02 23:06:10 +0100
committerMax Kellermann <max@duempel.org>2013-01-02 23:06:10 +0100
commit0eb05b827fc239854773b43baff82581d65f9c5b (patch)
treec4f5d1aba7b4aad89826707310b6b75573453408 /src/UpdateArchive.cxx
parent0c245bc2712f5d38507b8d421cdc0a7e002a3398 (diff)
downloadmpd-0eb05b827fc239854773b43baff82581d65f9c5b.tar.gz
mpd-0eb05b827fc239854773b43baff82581d65f9c5b.tar.xz
mpd-0eb05b827fc239854773b43baff82581d65f9c5b.zip
Directory: turn functions to methods
Diffstat (limited to '')
-rw-r--r--src/UpdateArchive.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/UpdateArchive.cxx b/src/UpdateArchive.cxx
index 4a45f3756..d0d180fdd 100644
--- a/src/UpdateArchive.cxx
+++ b/src/UpdateArchive.cxx
@@ -43,7 +43,7 @@ update_archive_tree(struct directory *directory, char *name)
//add dir is not there already
db_lock();
struct directory *subdir =
- directory_make_child(directory, name);
+ directory->MakeChild(name);
subdir->device = DEVICE_INARCHIVE;
db_unlock();
//create directories first
@@ -56,18 +56,18 @@ update_archive_tree(struct directory *directory, char *name)
//add file
db_lock();
- struct song *song = directory_get_song(directory, name);
+ struct song *song = directory->FindSong(name);
db_unlock();
if (song == NULL) {
song = song_file_load(name, directory);
if (song != NULL) {
db_lock();
- directory_add_song(directory, song);
+ directory->AddSong(song);
db_unlock();
modified = true;
g_message("added %s/%s",
- directory_get_path(directory), name);
+ directory->GetPath(), name);
}
}
}
@@ -87,7 +87,7 @@ update_archive_file2(struct directory *parent, const char *name,
const struct archive_plugin *plugin)
{
db_lock();
- struct directory *directory = directory_get_child(parent, name);
+ directory *directory = parent->FindChild(name);
db_unlock();
if (directory != NULL && directory->mtime == st->st_mtime &&
@@ -114,7 +114,7 @@ update_archive_file2(struct directory *parent, const char *name,
if (directory == NULL) {
g_debug("creating archive directory: %s", name);
db_lock();
- directory = directory_new_child(parent, name);
+ directory = parent->CreateChild(name);
/* mark this directory as archive (we use device for
this) */
directory->device = DEVICE_INARCHIVE;