LeechCraft  0.6.70-15082-g543737046d
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 {
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 
78 
81  Live,
82 
85  Soundtrack,
86 
90  Other
91  } Type_;
92 
96  };
97 
107  class Q_DECL_EXPORT IDiscographyProvider
108  {
109  public:
110  virtual ~IDiscographyProvider () {}
111 
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")
Media::ReleaseTrackInfo::Name_
QString Name_
The name of the track.
Definition: idiscographyprovider.h:34
Media::ReleaseInfo::Year_
int Year_
The year of this release.
Definition: idiscographyprovider.h:57
Media::ReleaseTrackInfo
Information about a track release.
Definition: idiscographyprovider.h:26
Media::ReleaseInfo::Type::EP
@ EP
An EP.
Media::ReleaseInfo::Type::Standard
@ Standard
A typical album.
QList
Definition: ianrulesstorage.h:14
Media::IDiscographyProvider::~IDiscographyProvider
virtual ~IDiscographyProvider()
Definition: idiscographyprovider.h:110
Media::ReleaseInfo::Name_
QString Name_
The name of this release.
Definition: idiscographyprovider.h:53
LC::Util::Either
Definition: either.h:33
Media::ReleaseInfo::Type
Type
The enum describing the recognized types of the releases.
Definition: idiscographyprovider.h:61
Media::ReleaseInfo::Type_
enum Media::ReleaseInfo::Type Type_
Media::ReleaseInfo::Type::Other
@ Other
Some other release type currently unrecognized by LeechCraft.
either.h
Media::ReleaseInfo
Information about a release, like an album or a single.
Definition: idiscographyprovider.h:45
Media::IDiscographyProvider
Interface for plugins supporting getting artist discography.
Definition: idiscographyprovider.h:107
Media::ReleaseInfo::Type::Soundtrack
@ Soundtrack
A soundtrack.
Media
Definition: audiostructs.h:16
Media::ReleaseInfo::TrackInfos_
QList< QList< ReleaseTrackInfo > > TrackInfos_
Definition: idiscographyprovider.h:95
audiostructs.h
Media::ReleaseTrackInfo::Length_
int Length_
The length of the track in this release.
Definition: idiscographyprovider.h:38
QFuture
Definition: idownload.h:17
Media::ReleaseInfo::Type::Compilation
@ Compilation
A compilation.
Media::ReleaseTrackInfo::Number_
int Number_
The number of the track in the release.
Definition: idiscographyprovider.h:30
Media::ReleaseInfo::Type::Single
@ Single
A single track release.
Media::ReleaseInfo::ID_
QString ID_
The internal ID of this release.
Definition: idiscographyprovider.h:49
Media::ReleaseInfo::Type::Live
@ Live
A live release.