LeechCraft
0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
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
Media::ReleaseInfo::Type_
enum Media::ReleaseInfo::Type Type_
Media::ReleaseInfo::Type::Standard
A typical album.
Media::ReleaseInfo::Type::Live
A live release.
either.h
Media::IDiscographyProvider::~IDiscographyProvider
virtual ~IDiscographyProvider()
Definition:
idiscographyprovider.h:110
Media::ReleaseTrackInfo
Information about a track release.
Definition:
idiscographyprovider.h:26
Media::ReleaseInfo::ID_
QString ID_
The internal ID of this release.
Definition:
idiscographyprovider.h:49
Media::ReleaseInfo::Type::EP
An EP.
Media::ReleaseInfo::Type::Single
A single track release.
Media::ReleaseInfo::Name_
QString Name_
The name of this release.
Definition:
idiscographyprovider.h:53
Media::ReleaseInfo
Information about a release, like an album or a single.
Definition:
idiscographyprovider.h:45
Media
Definition:
audiostructs.h:16
Media::IDiscographyProvider
Interface for plugins supporting getting artist discography.
Definition:
idiscographyprovider.h:107
QFuture
Definition:
idownload.h:17
Media::ReleaseInfo::Type::Compilation
A compilation.
QList
Definition:
ianrulesstorage.h:14
LC::Util::Either
Definition:
either.h:21
Media::ReleaseTrackInfo::Length_
int Length_
The length of the track in this release.
Definition:
idiscographyprovider.h:38
Media::ReleaseInfo::Type::Soundtrack
A soundtrack.
Media::ReleaseInfo::Type::Other
Some other release type currently unrecognized by LeechCraft.
Media::ReleaseInfo::Type
Type
The enum describing the recognized types of the releases.
Definition:
idiscographyprovider.h:61
Media::ReleaseTrackInfo::Name_
QString Name_
The name of the track.
Definition:
idiscographyprovider.h:34
Media::ReleaseTrackInfo::Number_
int Number_
The number of the track in the release.
Definition:
idiscographyprovider.h:30
Media::ReleaseInfo::Year_
int Year_
The year of this release.
Definition:
idiscographyprovider.h:57
Media::ReleaseInfo::TrackInfos_
QList< QList< ReleaseTrackInfo > > TrackInfos_
Definition:
idiscographyprovider.h:95
src
interfaces
media
idiscographyprovider.h
Generated by
1.8.14