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
14
template
<
typename
>
15
class
QFuture
;
16
17
namespace
Media
18
{
26
struct
ReleaseTrackInfo
27
{
30
int
Number_
;
31
34
QString
Name_
;
35
38
int
Length_
;
39
};
40
45
struct
ReleaseInfo
46
{
49
QString
ID_
;
50
53
QString
Name_
;
54
57
int
Year_
;
58
61
enum class
Type
62
{
65
Standard
,
66
69
EP
,
70
73
Single
,
74
77
Compilation
,
78
81
Live
,
82
85
Soundtrack
,
86
90
Other
91
}
Type_
;
92
95
QList<QList<ReleaseTrackInfo>
>
TrackInfos_
;
96
};
97
107
class
Q_DECL_EXPORT
IDiscographyProvider
108
{
109
public
:
110
virtual
~IDiscographyProvider
() {}
111
119
using
Result_t
=
LC::Util::Either<QString, QList<ReleaseInfo>
>;
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
160
Q_DECLARE_INTERFACE (
Media::IDiscographyProvider
,
"org.LeechCraft.Media.IDiscographyProvider/1.0"
)
audiostructs.h
LC::Util::Either
Definition
networkresult.h:47
Media::IDiscographyProvider
Interface for plugins supporting getting artist discography.
Definition
idiscographyprovider.h:108
Media::IDiscographyProvider::~IDiscographyProvider
virtual ~IDiscographyProvider()
Definition
idiscographyprovider.h:110
Media::IDiscographyProvider::GetReleaseInfo
virtual QFuture< Result_t > GetReleaseInfo(const QString &artist, const QString &release)=0
Fetches contents of the given release by the artist.
Media::IDiscographyProvider::Result_t
LC::Util::Either< QString, QList< ReleaseInfo > > Result_t
The result of an audio search query.
Definition
idiscographyprovider.h:119
Media::IDiscographyProvider::GetDiscography
virtual QFuture< Result_t > GetDiscography(const QString &artist, const QStringList &hints)=0
Fetches all the discography of the given artist.
Media::IDiscographyProvider::GetServiceName
virtual QString GetServiceName() const =0
Returns the service name.
QFuture
Definition
idownload.h:17
QList
Definition
ianrulesstorage.h:14
Media
Definition
audiostructs.h:17
either.h
Media::ReleaseInfo
Information about a release, like an album or a single.
Definition
idiscographyprovider.h:46
Media::ReleaseInfo::Type
Type
The enum describing the recognized types of the releases.
Definition
idiscographyprovider.h:62
Media::ReleaseInfo::Type::EP
@ EP
An EP.
Definition
idiscographyprovider.h:69
Media::ReleaseInfo::Type::Other
@ Other
Some other release type currently unrecognized by LeechCraft.
Definition
idiscographyprovider.h:90
Media::ReleaseInfo::Type::Single
@ Single
A single track release.
Definition
idiscographyprovider.h:73
Media::ReleaseInfo::Type::Soundtrack
@ Soundtrack
A soundtrack.
Definition
idiscographyprovider.h:85
Media::ReleaseInfo::Type::Live
@ Live
A live release.
Definition
idiscographyprovider.h:81
Media::ReleaseInfo::Type::Standard
@ Standard
A typical album.
Definition
idiscographyprovider.h:65
Media::ReleaseInfo::Type::Compilation
@ Compilation
A compilation.
Definition
idiscographyprovider.h:77
Media::ReleaseInfo::Type_
enum Media::ReleaseInfo::Type Type_
Media::ReleaseInfo::TrackInfos_
QList< QList< ReleaseTrackInfo > > TrackInfos_
Definition
idiscographyprovider.h:95
Media::ReleaseInfo::ID_
QString ID_
The internal ID of this release.
Definition
idiscographyprovider.h:49
Media::ReleaseInfo::Name_
QString Name_
The name of this release.
Definition
idiscographyprovider.h:53
Media::ReleaseInfo::Year_
int Year_
The year of this release.
Definition
idiscographyprovider.h:57
Media::ReleaseTrackInfo
Information about a track release.
Definition
idiscographyprovider.h:27
Media::ReleaseTrackInfo::Length_
int Length_
The length of the track in this release.
Definition
idiscographyprovider.h:38
Media::ReleaseTrackInfo::Number_
int Number_
The number of the track in the release.
Definition
idiscographyprovider.h:30
Media::ReleaseTrackInfo::Name_
QString Name_
The name of the track.
Definition
idiscographyprovider.h:34
src
interfaces
media
idiscographyprovider.h
Generated by
1.13.1