LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
idiscographyprovider.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <util/sll/either.h>
12#include "audiostructs.h"
13
14template<typename>
15class QFuture;
16
17namespace Media
18{
27 {
31
34 QString Name_;
35
39 };
40
46 {
49 QString ID_;
50
53 QString Name_;
54
57 int Year_;
58
92
96 };
97
107 class Q_DECL_EXPORT IDiscographyProvider
108 {
109 public:
111
120
128 virtual QString GetServiceName () const = 0;
129
145 virtual QFuture<Result_t> GetDiscography (const QString& artist, const QStringList& hints) = 0;
146
156 virtual QFuture<Result_t> GetReleaseInfo (const QString& artist, const QString& release) = 0;
157 };
158}
159
160Q_DECLARE_INTERFACE (Media::IDiscographyProvider, "org.LeechCraft.Media.IDiscographyProvider/1.0")
Interface for plugins supporting getting artist discography.
virtual QFuture< Result_t > GetReleaseInfo(const QString &artist, const QString &release)=0
Fetches contents of the given release by the artist.
LC::Util::Either< QString, QList< ReleaseInfo > > Result_t
The result of an audio search query.
virtual QFuture< Result_t > GetDiscography(const QString &artist, const QStringList &hints)=0
Fetches all the discography of the given artist.
virtual QString GetServiceName() const =0
Returns the service name.
Information about a release, like an album or a single.
Type
The enum describing the recognized types of the releases.
@ Other
Some other release type currently unrecognized by LeechCraft.
@ Single
A single track release.
enum Media::ReleaseInfo::Type Type_
QList< QList< ReleaseTrackInfo > > TrackInfos_
QString ID_
The internal ID of this release.
QString Name_
The name of this release.
int Year_
The year of this release.
Information about a track release.
int Length_
The length of the track in this release.
int Number_
The number of the track in the release.
QString Name_
The name of the track.