Album.h 903 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef ALBUM_H
#define ALBUM_H

#include <sqlite3.h>

#include "IAlbum.h"

class Album : public IAlbum
{
    public:
        Album( sqlite3* dbConnection, sqlite3_stmt* stmt );
        Album( sqlite3* dbConnection );

        virtual const std::string& name();
        virtual unsigned int releaseYear();
        virtual const std::string& shortSummary();
        virtual const std::string& artworkUrl();
        virtual time_t lastSyncDate();
19
        virtual const std::vector<ITrack*>& tracks();
20 21

        static bool CreateTable( sqlite3* dbConnection );
22
        static Album* fetch( sqlite3* dbConnection, unsigned int albumTrackId );
23 24 25 26 27 28 29 30 31 32 33 34 35

    protected:
        sqlite3* m_dbConnection;
        unsigned int m_id;
        std::string m_name;
        unsigned int m_releaseYear;
        std::string m_shortSummary;
        std::string m_artworkUrl;
        time_t m_lastSyncDate;

};

#endif // ALBUM_H