LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
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  {
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 
117 Q_DECLARE_INTERFACE (Media::IArtistBioFetcher, "org.LeechCraft.Media.IArtistBioFetcher/1.0")
Media::ArtistImage::Full_
QUrl Full_
URL of the full version of the image.
Definition: iartistbiofetcher.h:44
Media::ArtistBio::BasicInfo_
ArtistInfo BasicInfo_
Basic information about this artist.
Definition: iartistbiofetcher.h:62
Media::ArtistBio::operator!=
bool operator!=(const ArtistBio &) const =default
QList
Definition: ianrulesstorage.h:14
Media::ArtistInfo
A structure describing an artist.
Definition: audiostructs.h:86
Media::IArtistBioFetcher
Interface for plugins supporting fetching artist biography.
Definition: iartistbiofetcher.h:80
LC::Util::Either
Definition: either.h:33
Media::ArtistImage::Thumb_
QUrl Thumb_
URL of the thumbnail version of the image.
Definition: iartistbiofetcher.h:40
Media::ArtistImage::operator==
bool operator==(const ArtistImage &) const =default
Media::ArtistImage::operator!=
bool operator!=(const ArtistImage &) const =default
Media::ArtistImage
Describes a single artist photo.
Definition: iartistbiofetcher.h:24
Media::ArtistBio::OtherImages_
QList< ArtistImage > OtherImages_
Other images for this artist.
Definition: iartistbiofetcher.h:69
Media
Definition: audiostructs.h:16
Media::IArtistBioFetcher::~IArtistBioFetcher
virtual ~IArtistBioFetcher()
Definition: iartistbiofetcher.h:83
Media::ArtistImage::Date_
QDateTime Date_
The date and time the image was taken.
Definition: iartistbiofetcher.h:36
audiostructs.h
QFuture
Definition: idownload.h:17
Media::ArtistBio::operator==
bool operator==(const ArtistBio &) const =default
Media::ArtistBio
Information about artist biography.
Definition: iartistbiofetcher.h:58
Media::ArtistImage::Title_
QString Title_
The title of the image.
Definition: iartistbiofetcher.h:28
Media::ArtistImage::Author_
QString Author_
The author if the image.
Definition: iartistbiofetcher.h:32
eitherfwd.h