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
15class QObject;
16
17template<typename>
18class QFuture;
19
20namespace Media
21{
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 {
63
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
93
101 virtual QString GetServiceName () const = 0;
102
113 virtual QFuture<Result_t> RequestArtistBio (const QString& artist, bool additionalImages = true) = 0;
114 };
115}
116
117Q_DECLARE_INTERFACE (Media::IArtistBioFetcher, "org.LeechCraft.Media.IArtistBioFetcher/1.0")
Interface for plugins supporting fetching artist biography.
virtual QString GetServiceName() const =0
Returns the service name.
virtual QFuture< Result_t > RequestArtistBio(const QString &artist, bool additionalImages=true)=0
Requests the biography of the given artist.
LC::Util::Either< QString, ArtistBio > Result_t
The result of an artist biography search query.
Information about artist biography.
bool operator!=(const ArtistBio &) const =default
QList< ArtistImage > OtherImages_
Other images for this artist.
bool operator==(const ArtistBio &) const =default
ArtistInfo BasicInfo_
Basic information about this artist.
Describes a single artist photo.
QString Title_
The title of the image.
bool operator==(const ArtistImage &) const =default
QUrl Full_
URL of the full version of the image.
bool operator!=(const ArtistImage &) const =default
QDateTime Date_
The date and time the image was taken.
QUrl Thumb_
URL of the thumbnail version of the image.
QString Author_
The author if the image.
A structure describing an artist.