make playlist and playlist editor share code responsible for moving items

This commit is contained in:
Andrzej Rybczak
2012-09-04 18:14:37 +02:00
parent 60ca9de919
commit bb121fbe01
13 changed files with 424 additions and 378 deletions

View File

@@ -155,3 +155,21 @@ MPD::Song::GetFunction charToGetFunction(char c)
return 0;
}
}
std::string itemTypeToString(MPD::ItemType type)
{
std::string result;
switch (type)
{
case MPD::itDirectory:
result = "directory";
break;
case MPD::itSong:
result = "song";
break;
case MPD::itPlaylist:
result = "playlist";
break;
}
return result;
}

View File

@@ -21,6 +21,7 @@
#ifndef _UTILITY_TYPE_CONVERSIONS
#define _UTILITY_TYPE_CONVERSIONS
#include "mpdpp.h"
#include "mutable_song.h"
std::string tagTypeToString(mpd_tag_type tag);
@@ -29,4 +30,6 @@ MPD::MutableSong::SetFunction tagTypeToSetFunction(mpd_tag_type tag);
mpd_tag_type charToTagType(char c);
MPD::Song::GetFunction charToGetFunction(char c);
std::string itemTypeToString(MPD::ItemType type);
#endif // _UTILITY_TYPE_CONVERSIONS