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

#include <sqlite3.h>

#include "IAlbum.h"

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

        virtual const std::string& name();
        virtual unsigned int releaseYear();
        virtual const std::string& shortSummary();
        virtual const std::string& artworkUrl();
        virtual time_t lastSyncDate();
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
18
        virtual const std::vector<IAlbumTrack*>& tracks();
19

20
        static bool createTable( sqlite3* dbConnection );
21
        static Album* fetch( sqlite3* dbConnection, unsigned int albumTrackId );
22 23 24 25 26 27 28 29 30 31

    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;

Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
32
        std::vector<IAlbumTrack*>* m_tracks;
33 34 35
};

#endif // ALBUM_H