LeechCraft
0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
itopprovider.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 <QString>
12
#include <QList>
13
#include <QUrl>
14
#include <
util/sll/eitherfwd.h
>
15
#include "
audiostructs.h
"
16
17
template
<
typename
>
18
class
QFuture
;
19
20
namespace
Media
21
{
26
struct
TopArtistInfo
27
{
33
ArtistInfo
Info_
;
34
42
int
Playcount_
;
43
51
int
Listeners_
;
52
};
53
58
struct
TopTrackInfo
59
{
62
QString
TrackName_
;
63
70
QUrl
TrackPage_
;
71
79
int
Playcount_
;
80
88
int
Listeners_
;
89
92
int
Duration_
;
93
96
QUrl
Image_
;
97
100
QUrl
LargeImage_
;
101
104
QString
ArtistName_
;
105
112
QUrl
ArtistPage_
;
113
};
114
117
class
Q_DECL_EXPORT
ITopProvider
118
{
119
public
:
120
virtual
~ITopProvider
() {}
121
127
using
TopArtistsResult_t
=
LC::Util::Either<QString, QList<TopArtistInfo>
>;
128
134
using
TopTracksResult_t
=
LC::Util::Either<QString, QList<TopTrackInfo>
>;
135
143
virtual
QString
GetServiceName
()
const
= 0;
144
149
virtual
QFuture<TopArtistsResult_t>
RequestTopArtists
() = 0;
150
155
virtual
QFuture<TopTracksResult_t>
RequestTopTracks
() = 0;
156
};
157
}
158
159
Q_DECLARE_INTERFACE (
Media::ITopProvider
,
"org.LeechCraft.Media.ITopProvider/1.0"
)
audiostructs.h
LC::Util::Either
Definition
either.h:34
Media::ITopProvider
Interface for plugins that provide top charts.
Definition
itopprovider.h:118
Media::ITopProvider::GetServiceName
virtual QString GetServiceName() const =0
Returns the service name.
Media::ITopProvider::TopTracksResult_t
LC::Util::Either< QString, QList< TopTrackInfo > > TopTracksResult_t
The result of a top tracks query.
Definition
itopprovider.h:134
Media::ITopProvider::RequestTopTracks
virtual QFuture< TopTracksResult_t > RequestTopTracks()=0
Requests the list of top tracks.
Media::ITopProvider::RequestTopArtists
virtual QFuture< TopArtistsResult_t > RequestTopArtists()=0
Requests the list of top artists.
Media::ITopProvider::~ITopProvider
virtual ~ITopProvider()
Definition
itopprovider.h:120
Media::ITopProvider::TopArtistsResult_t
LC::Util::Either< QString, QList< TopArtistInfo > > TopArtistsResult_t
The result of a top artists query.
Definition
itopprovider.h:127
QFuture
Definition
idownload.h:17
eitherfwd.h
Media
Definition
audiostructs.h:17
Media::ArtistInfo
A structure describing an artist.
Definition
audiostructs.h:81
Media::TopArtistInfo
Contains information about an artist in the top charts.
Definition
itopprovider.h:27
Media::TopArtistInfo::Info_
ArtistInfo Info_
Basic information about the artist.
Definition
itopprovider.h:33
Media::TopArtistInfo::Listeners_
int Listeners_
Number of listeners.
Definition
itopprovider.h:51
Media::TopArtistInfo::Playcount_
int Playcount_
Play count.
Definition
itopprovider.h:42
Media::TopTrackInfo
Contains information about a track in the top charts.
Definition
itopprovider.h:59
Media::TopTrackInfo::Image_
QUrl Image_
URL of thumb image of this track or performing artist.
Definition
itopprovider.h:96
Media::TopTrackInfo::Listeners_
int Listeners_
Number of listeners.
Definition
itopprovider.h:88
Media::TopTrackInfo::ArtistName_
QString ArtistName_
Name of the performer of this track.
Definition
itopprovider.h:104
Media::TopTrackInfo::LargeImage_
QUrl LargeImage_
Full size image of this track or performing artist.
Definition
itopprovider.h:100
Media::TopTrackInfo::Playcount_
int Playcount_
Play count.
Definition
itopprovider.h:79
Media::TopTrackInfo::TrackName_
QString TrackName_
Name of the track.
Definition
itopprovider.h:62
Media::TopTrackInfo::ArtistPage_
QUrl ArtistPage_
URL of the artist page.
Definition
itopprovider.h:112
Media::TopTrackInfo::Duration_
int Duration_
Duration of the track.
Definition
itopprovider.h:92
Media::TopTrackInfo::TrackPage_
QUrl TrackPage_
Address of the track page.
Definition
itopprovider.h:70
src
interfaces
media
itopprovider.h
Generated by
1.18.0