aboutsummaryrefslogtreecommitdiffstats
path: root/test/visit_archive.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/visit_archive.cxx')
-rw-r--r--test/visit_archive.cxx30
1 files changed, 9 insertions, 21 deletions
diff --git a/test/visit_archive.cxx b/test/visit_archive.cxx
index 6e66c4696..d4854d8f1 100644
--- a/test/visit_archive.cxx
+++ b/test/visit_archive.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -20,13 +20,13 @@
#include "config.h"
#include "stdbin.h"
#include "tag/Tag.hxx"
-#include "ConfigGlobal.hxx"
+#include "config/ConfigGlobal.hxx"
#include "IOThread.hxx"
-#include "InputInit.hxx"
-#include "ArchiveList.hxx"
-#include "ArchivePlugin.hxx"
-#include "ArchiveFile.hxx"
-#include "ArchiveVisitor.hxx"
+#include "input/Init.hxx"
+#include "archive/ArchiveList.hxx"
+#include "archive/ArchivePlugin.hxx"
+#include "archive/ArchiveFile.hxx"
+#include "archive/ArchiveVisitor.hxx"
#include "fs/Path.hxx"
#include "util/Error.hxx"
@@ -35,16 +35,6 @@
#include <unistd.h>
#include <stdlib.h>
-static void
-my_log_func(const gchar *log_domain, gcc_unused GLogLevelFlags log_level,
- const gchar *message, gcc_unused gpointer user_data)
-{
- if (log_domain != NULL)
- g_printerr("%s: %s\n", log_domain, message);
- else
- g_printerr("%s\n", message);
-}
-
class MyArchiveVisitor final : public ArchiveVisitor {
public:
virtual void VisitArchiveEntry(const char *path_utf8) override {
@@ -71,8 +61,6 @@ main(int argc, char **argv)
g_thread_init(NULL);
#endif
- g_log_set_default_handler(my_log_func, NULL);
-
/* initialize MPD */
config_global_init();
@@ -89,7 +77,7 @@ main(int argc, char **argv)
/* open the archive and dump it */
- const archive_plugin *plugin = archive_plugin_from_name(plugin_name);
+ const ArchivePlugin *plugin = archive_plugin_from_name(plugin_name);
if (plugin == nullptr) {
fprintf(stderr, "No such plugin: %s\n", plugin_name);
return EXIT_FAILURE;
@@ -97,7 +85,7 @@ main(int argc, char **argv)
int result = EXIT_SUCCESS;
- ArchiveFile *file = archive_file_open(plugin, path.c_str(), error);
+ ArchiveFile *file = archive_file_open(plugin, path, error);
if (file != nullptr) {
MyArchiveVisitor visitor;
file->Visit(visitor);