LeechCraft 0.6.70-17335-ge406ffdcaf
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
iaudioscrobbler.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 "audiostructs.h"
13
14namespace Media
15{
21 class Q_DECL_EXPORT IAudioScrobbler
22 {
23 public:
24 virtual ~IAudioScrobbler () {}
25
29 using BackdatedTrack_t = QPair<Media::AudioInfo, QDateTime>;
30
34
39 enum class Feature
40 {
47 };
48
54 virtual bool SupportsFeature (Feature feature) const = 0;
55
63 virtual QString GetServiceName () const = 0;
64
78 virtual void NowPlaying (const AudioInfo& audio) = 0;
79
88 virtual void SendBackdated (const BackdatedTracks_t& list) = 0;
89
96 virtual void PlaybackStopped () = 0;
97
106 virtual void LoveCurrentTrack () = 0;
107
116 virtual void BanCurrentTrack () = 0;
117 };
118}
119
120Q_DECLARE_INTERFACE (Media::IAudioScrobbler, "org.LeechCraft.Media.IAudioScrobbler/1.0")
Interface for plugins that support scrobbling.
virtual void BanCurrentTrack()=0
Notifies the scrobbler that user hates current track.
QPair< Media::AudioInfo, QDateTime > BackdatedTrack_t
A backdated track - a track with its real playback time.
Feature
A list of optional features a scrobbler may support.
@ Backdating
Whether the scrobbler allows sending audiotracks marked by past timestamps.
QList< BackdatedTrack_t > BackdatedTracks_t
A list of backdated tracks.
virtual void NowPlaying(const AudioInfo &audio)=0
Notifies the scrobbler that a new track is playing.
virtual QString GetServiceName() const =0
Returns the service name.
virtual void LoveCurrentTrack()=0
Notifies the scrobbler that user loves current track.
virtual void SendBackdated(const BackdatedTracks_t &list)=0
Sends a list of backdated tracks.
virtual bool SupportsFeature(Feature feature) const =0
Queries whether a given feature is supported.
virtual void PlaybackStopped()=0
Notifies the scrobbler that playback is stopped.
Describes a single audio track.