LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
ilyricsfinder.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 <optional>
12 #include <QStringList>
13 #include <util/sll/eitherfwd.h>
14 
15 template<typename>
16 class QFuture;
17 
18 namespace Media
19 {
24  struct LyricsQuery
25  {
28  QString Artist_;
29 
32  QString Album_;
33 
36  QString Title_;
37 
40  std::optional<int> Year_;
41 
44  std::optional<int> Track_;
45  };
46 
55  {
58  QString ProviderName_;
59 
62  QString Lyrics_;
63  };
64 
70 
76  class Q_DECL_EXPORT ILyricsFinder
77  {
78  public:
79  virtual ~ILyricsFinder () {}
80 
89 
98  virtual QFuture<LyricsQueryResult_t> RequestLyrics (const LyricsQuery& query) = 0;
99  };
100 }
101 
102 Q_DECLARE_INTERFACE (Media::ILyricsFinder, "org.LeechCraft.Media.ILyricsFinder/1.0")
Media::LyricsResultItem
Describes a single lyrics result item.
Definition: ilyricsfinder.h:54
QList
Definition: ianrulesstorage.h:14
Media::LyricsQuery::Artist_
QString Artist_
The artist preforming the track.
Definition: ilyricsfinder.h:28
Media::LyricsQuery::Year_
std::optional< int > Year_
The year of the album the track is on.
Definition: ilyricsfinder.h:40
Media::LyricsQuery
Describes a lyrics search request.
Definition: ilyricsfinder.h:24
LC::Util::Either
Definition: either.h:33
Media::ILyricsFinder::~ILyricsFinder
virtual ~ILyricsFinder()
Definition: ilyricsfinder.h:79
Media
Definition: audiostructs.h:16
Media::LyricsQuery::Track_
std::optional< int > Track_
The track number.
Definition: ilyricsfinder.h:44
Media::ILyricsFinder
Interface for plugins supporting finding lyrics.
Definition: ilyricsfinder.h:76
Media::LyricsQuery::Album_
QString Album_
The album this track is on.
Definition: ilyricsfinder.h:32
Media::LyricsQuery::Title_
QString Title_
The title of the track.
Definition: ilyricsfinder.h:36
QFuture
Definition: idownload.h:17
Media::LyricsResultItem::Lyrics_
QString Lyrics_
The HTML-formatted lyrics string.
Definition: ilyricsfinder.h:62
eitherfwd.h
Media::LyricsResultItem::ProviderName_
QString ProviderName_
The name of the provider lyrics were fetched from.
Definition: ilyricsfinder.h:58