aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabasePrint.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-28 13:25:12 +0200
committerMax Kellermann <max@duempel.org>2013-07-28 13:25:12 +0200
commitba161ec572b98d3bcf9f735ff122133319fe896a (patch)
treea211690e3a8b7fce1fb6db540228122bead1f2bc /src/DatabasePrint.cxx
parent43f613d9be9aa2953dcfc0aacfbdfb56d5d1a708 (diff)
downloadmpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.gz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.xz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.zip
song: convert header to C++
Diffstat (limited to 'src/DatabasePrint.cxx')
-rw-r--r--src/DatabasePrint.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/DatabasePrint.cxx b/src/DatabasePrint.cxx
index 2384d5c14..da427c59f 100644
--- a/src/DatabasePrint.cxx
+++ b/src/DatabasePrint.cxx
@@ -27,11 +27,7 @@
#include "Directory.hxx"
#include "Client.hxx"
#include "tag.h"
-
-extern "C" {
-#include "song.h"
-}
-
+#include "Song.hxx"
#include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx"
@@ -59,7 +55,7 @@ print_playlist_in_directory(Client *client,
}
static bool
-PrintSongBrief(Client *client, song &song)
+PrintSongBrief(Client *client, Song &song)
{
assert(song.parent != NULL);
@@ -73,7 +69,7 @@ PrintSongBrief(Client *client, song &song)
}
static bool
-PrintSongFull(Client *client, song &song)
+PrintSongFull(Client *client, Song &song)
{
assert(song.parent != NULL);
@@ -142,10 +138,10 @@ static void printSearchStats(Client *client, SearchStats *stats)
}
static bool
-stats_visitor_song(SearchStats &stats, song &song)
+stats_visitor_song(SearchStats &stats, Song &song)
{
stats.numberOfSongs++;
- stats.playTime += song_get_duration(&song);
+ stats.playTime += song.GetDuration();
return true;
}
@@ -191,7 +187,7 @@ printInfoForAllIn(Client *client, const char *uri_utf8,
}
static bool
-PrintSongURIVisitor(Client *client, song &song)
+PrintSongURIVisitor(Client *client, Song &song)
{
song_print_uri(client, &song);