Album.h 849 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#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();

        static bool CreateTable( sqlite3* dbConnection );
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
21
        static Album* Fetch( sqlite3* dbConnection, unsigned int albumTrackId );
22 23 24 25 26 27 28 29 30 31 32 33 34

    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