IAlbumTrack.h 2.19 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/*****************************************************************************
 * Media Library
 *****************************************************************************
 * Copyright (C) 2015 Hugo Beauzée-Luyssen, Videolabs
 *
 * Authors: Hugo Beauzée-Luyssen<hugo@beauzee.fr>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

23 24 25
#ifndef IALBUMTRACK_H
#define IALBUMTRACK_H

26
#include "IMediaLibrary.h"
27

28 29 30
namespace medialibrary
{

31 32 33
class IAlbumTrack
{
    public:
34
        virtual ~IAlbumTrack() = default;
35

36
        virtual int64_t id() const = 0;
37
        /**
38
         * @brief artist Returns the artist, as tagged in the media.
39 40 41 42 43 44
         * This can be different from the associated media's artist.
         * For instance, in case of a featuring, Media::artist() might return
         * "Artist 1", while IAlbumTrack::artist() might return something like
         * "Artist 1 featuring Artist 2 and also artist 3 and a whole bunch of people"
         * @return
         */
45
        virtual ArtistPtr artist() const = 0;
46
        virtual int64_t artistId() const = 0;
47
        virtual GenrePtr genre() = 0;
48
        virtual int64_t genreId() const = 0;
49
        virtual unsigned int trackNumber() const = 0;
50
        virtual AlbumPtr album() = 0;
51
        virtual int64_t albumId() const = 0;
52 53 54 55
        /**
         * @return Which disc this tracks appears on (or 0 if unspecified)
         */
        virtual unsigned int discNumber() const = 0;
56 57
};

58 59
}

60
#endif // IALBUMTRACK_H