From 0eb05b827fc239854773b43baff82581d65f9c5b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 2 Jan 2013 23:06:10 +0100 Subject: Directory: turn functions to methods --- src/UpdateArchive.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/UpdateArchive.cxx') 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; -- cgit v1.2.3