make ncmpcpp use external libmpdclient (--without-taglib and --without-iconv)
This commit is contained in:
22
src/song.h
22
src/song.h
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "libmpdclient.h"
|
||||
#include <mpd/client.h>
|
||||
|
||||
namespace MPD
|
||||
{
|
||||
@@ -34,8 +34,8 @@ namespace MPD
|
||||
typedef void (Song::*SetFunction)(const std::string &);
|
||||
typedef std::string (Song::*GetFunction)() const;
|
||||
|
||||
Song() : itsSlash(std::string::npos), itsHash(0), copyPtr(0), isLocalised(0) { itsSong = mpd_newSong(); }
|
||||
Song(mpd_Song *, bool = 0);
|
||||
Song() : itsSong(0), itsSlash(std::string::npos), itsHash(0), copyPtr(0), isLocalised(0) { }
|
||||
Song(mpd_song *, bool = 0);
|
||||
Song(const Song &);
|
||||
~Song();
|
||||
|
||||
@@ -56,24 +56,24 @@ namespace MPD
|
||||
std::string GetLength() const;
|
||||
|
||||
unsigned GetHash() const { return itsHash; }
|
||||
int GetTotalLength() const { return itsSong->time < 0 ? 0 : itsSong->time; }
|
||||
int GetPosition() const { return itsSong->pos; }
|
||||
int GetID() const { return itsSong->id; }
|
||||
unsigned GetTotalLength() const { return mpd_song_get_duration(itsSong); }
|
||||
unsigned GetPosition() const { return mpd_song_get_pos(itsSong); }
|
||||
unsigned GetID() const { return mpd_song_get_id(itsSong); }
|
||||
|
||||
void SetFile(const std::string &);
|
||||
//void SetFile(const std::string &);
|
||||
void SetArtist(const std::string &);
|
||||
void SetTitle(const std::string &);
|
||||
void SetAlbum(const std::string &);
|
||||
void SetTrack(const std::string &);
|
||||
void SetTrack(int);
|
||||
void SetTrack(unsigned);
|
||||
void SetDate(const std::string &);
|
||||
void SetDate(int);
|
||||
void SetDate(unsigned);
|
||||
void SetGenre(const std::string &);
|
||||
void SetComposer(const std::string &);
|
||||
void SetPerformer(const std::string &);
|
||||
void SetDisc(const std::string &);
|
||||
void SetComment(const std::string &);
|
||||
void SetPosition(int);
|
||||
void SetPosition(unsigned);
|
||||
|
||||
void SetNewName(const std::string &name) { itsNewName = name == GetName() ? "" : name; }
|
||||
std::string GetNewName() const { return itsNewName; }
|
||||
@@ -99,7 +99,7 @@ namespace MPD
|
||||
void SetHashAndSlash();
|
||||
std::string ParseFormat(std::string::const_iterator &it) const;
|
||||
|
||||
mpd_Song *itsSong;
|
||||
mpd_song *itsSong;
|
||||
std::string itsNewName;
|
||||
size_t itsSlash;
|
||||
unsigned itsHash;
|
||||
|
||||
Reference in New Issue
Block a user