LeechCraft
0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
iartistbiofetcher.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 <QDateTime>
12
#include <
util/sll/eitherfwd.h
>
13
#include "
audiostructs.h
"
14
15
class
QObject;
16
17
template
<
typename
>
18
class
QFuture
;
19
20
namespace
Media
21
{
24
struct
ArtistImage
25
{
28
QString
Title_
;
29
32
QString
Author_
;
33
36
QDateTime
Date_
;
37
40
QUrl
Thumb_
;
41
44
QUrl
Full_
;
45
46
bool
operator==
(
const
ArtistImage
&)
const
=
default
;
47
bool
operator!=
(
const
ArtistImage
&)
const
=
default
;
48
};
49
58
struct
ArtistBio
59
{
62
ArtistInfo
BasicInfo_
;
63
69
QList<ArtistImage>
OtherImages_
;
70
71
bool
operator==
(
const
ArtistBio
&)
const
=
default
;
72
bool
operator!=
(
const
ArtistBio
&)
const
=
default
;
73
};
74
80
class
Q_DECL_EXPORT
IArtistBioFetcher
81
{
82
public
:
83
virtual
~IArtistBioFetcher
() {}
84
92
using
Result_t
=
LC::Util::Either<QString, ArtistBio>
;
93
101
virtual
QString
GetServiceName
()
const
= 0;
102
113
virtual
QFuture<Result_t>
RequestArtistBio
(
const
QString& artist,
bool
additionalImages =
true
) = 0;
114
};
115
}
116
117
Q_DECLARE_INTERFACE (
Media::IArtistBioFetcher
,
"org.LeechCraft.Media.IArtistBioFetcher/1.0"
)
audiostructs.h
LC::Util::Either
Definition
either.h:22
Media::IArtistBioFetcher
Interface for plugins supporting fetching artist biography.
Definition
iartistbiofetcher.h:81
Media::IArtistBioFetcher::GetServiceName
virtual QString GetServiceName() const =0
Returns the service name.
Media::IArtistBioFetcher::RequestArtistBio
virtual QFuture< Result_t > RequestArtistBio(const QString &artist, bool additionalImages=true)=0
Requests the biography of the given artist.
Media::IArtistBioFetcher::~IArtistBioFetcher
virtual ~IArtistBioFetcher()
Definition
iartistbiofetcher.h:83
QFuture
Definition
idownload.h:17
QList
Definition
ianrulesstorage.h:14
eitherfwd.h
Media
Definition
audiostructs.h:17
Media::ArtistBio
Information about artist biography.
Definition
iartistbiofetcher.h:59
Media::ArtistBio::operator!=
bool operator!=(const ArtistBio &) const =default
Media::ArtistBio::OtherImages_
QList< ArtistImage > OtherImages_
Other images for this artist.
Definition
iartistbiofetcher.h:69
Media::ArtistBio::operator==
bool operator==(const ArtistBio &) const =default
Media::ArtistBio::BasicInfo_
ArtistInfo BasicInfo_
Basic information about this artist.
Definition
iartistbiofetcher.h:62
Media::ArtistImage
Describes a single artist photo.
Definition
iartistbiofetcher.h:25
Media::ArtistImage::Title_
QString Title_
The title of the image.
Definition
iartistbiofetcher.h:28
Media::ArtistImage::operator==
bool operator==(const ArtistImage &) const =default
Media::ArtistImage::Full_
QUrl Full_
URL of the full version of the image.
Definition
iartistbiofetcher.h:44
Media::ArtistImage::operator!=
bool operator!=(const ArtistImage &) const =default
Media::ArtistImage::Date_
QDateTime Date_
The date and time the image was taken.
Definition
iartistbiofetcher.h:36
Media::ArtistImage::Thumb_
QUrl Thumb_
URL of the thumbnail version of the image.
Definition
iartistbiofetcher.h:40
Media::ArtistImage::Author_
QString Author_
The author if the image.
Definition
iartistbiofetcher.h:32
Media::ArtistInfo
A structure describing an artist.
Definition
audiostructs.h:81
src
interfaces
media
iartistbiofetcher.h
Generated by
1.10.0