#ifndef __SONGINFO_H
#define __SONGINFO_H

#include <string>

using std::string;

class InfoSlave
{
public:
    virtual string get_artist() { return ""; }
    virtual string get_title()  { return ""; }
    virtual string get_album()  { return ""; }

    // real info
    virtual int get_year() { return 0; }
    virtual int get_length() { return 0; }
    virtual int get_bitrate() { return 0; }
    virtual int get_track() { return 0; }

    virtual ~InfoSlave() {};
};

class SongInfo : public InfoSlave
{
public:
    SongInfo() : filename(""), myslave(0) { };
    SongInfo(const string &_filename) { link(_filename); }
    ~SongInfo() { delete myslave; }

    virtual string get_artist()
        { return myslave->get_artist(); }
    virtual string get_title()
        { return myslave->get_title(); }
    virtual string get_album()
        { return myslave->get_album(); }

    // realinfo
    virtual int get_year()
        { return myslave->get_year(); }
    virtual int get_length()
        { return myslave->get_length(); }
    virtual int get_bitrate()
        { return myslave->get_bitrate(); }
    virtual int get_track()
        { return myslave->get_track(); }

    void link(const string &_filename);

protected:
    string filename;
    InfoSlave *myslave;
};

#endif
