#ifndef ARTIST_H
#define ARTIST_H

#include <QUrl>
#include "musicobject.h"

class MusicLibrary;
class Record;

/**
 * Represents an artist
 */
class MUSICLIBRARYSIMPLESHARED_EXPORT Artist : public MusicObject
{
    Q_OBJECT

public:

    /**
     * Creates an artist and assigns it to music library.
     * The music library object becomes the parent of this
     * in QT object hierarchy.
     */
    Artist(MusicLibrary *library);

    /**
     * Deletes this artist and all records and songs it owns
     */
    ~Artist();

    /**
     * Gets the music library
     */
    MusicLibrary *library();

    /**
     * Sets artist home page
     */
    void setHomePage(const QUrl &homePage);

    /**
     * Gets artist home page
     */
    QUrl homePage() const;

    /**
     * Gets a list of records made by the artist and sorted
     * by the release date of the record
     */
    QList<Record *> records() const;
};

#endif // ARTIST_H
