![]() |
LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Interface for plugins that support scrobbling. More...
#include "iaudioscrobbler.h"
Public Types | |
enum | Feature { Feature::Backdating } |
A list of optional features a scrobbler may support. More... | |
using | BackdatedTrack_t = QPair< Media::AudioInfo, QDateTime > |
A backdated track - a track with its real playback time. More... | |
using | BackdatedTracks_t = QList< BackdatedTrack_t > |
A list of backdated tracks. More... | |
Public Member Functions | |
virtual | ~IAudioScrobbler () |
virtual bool | SupportsFeature (Feature feature) const =0 |
Queries whether a given feature is supported. More... | |
virtual QString | GetServiceName () const =0 |
Returns the service name. More... | |
virtual void | NowPlaying (const AudioInfo &audio)=0 |
Notifies the scrobbler that a new track is playing. More... | |
virtual void | SendBackdated (const BackdatedTracks_t &list)=0 |
Sends a list of backdated tracks. More... | |
virtual void | PlaybackStopped ()=0 |
Notifies the scrobbler that playback is stopped. More... | |
virtual void | LoveCurrentTrack ()=0 |
Notifies the scrobbler that user loves current track. More... | |
virtual void | BanCurrentTrack ()=0 |
Notifies the scrobbler that user hates current track. More... | |
Interface for plugins that support scrobbling.
Plugins supporting scrobbling listened tracks to services like Last.FM or Jamendo should implement this interface.
Definition at line 27 of file iaudioscrobbler.h.
using Media::IAudioScrobbler::BackdatedTrack_t = QPair<Media::AudioInfo, QDateTime> |
A backdated track - a track with its real playback time.
Definition at line 41 of file iaudioscrobbler.h.
A list of backdated tracks.
Definition at line 45 of file iaudioscrobbler.h.
|
strong |
A list of optional features a scrobbler may support.
Enumerator | |
---|---|
Backdating | Whether the scrobbler allows sending audiotracks marked by past timestamps.
|
Definition at line 51 of file iaudioscrobbler.h.
|
inlinevirtual |
Definition at line 36 of file iaudioscrobbler.h.
|
pure virtual |
Notifies the scrobbler that user hates current track.
This function should be called when user explicitly states that he hates the current track, that is, the track described by the last call to NowPlaying().
|
pure virtual |
Returns the service name.
This string returns a human-readable string with the service name, like "Last.FM".
|
pure virtual |
Notifies the scrobbler that user loves current track.
This function should be called when user explicitly states that he loves the current track, that is, the track described by the last call to NowPlaying().
|
pure virtual |
Notifies the scrobbler that a new track is playing.
This function should be called by an audio player when a new track is playing. The track data is contained in the audio parameter.
This function should only be called when a track has been changed, or when the user has explicitly restarted track playback. This function should not be called after pausing and resuming playback.
[in] | audio | The information about currently playing track. |
|
pure virtual |
Notifies the scrobbler that playback is stopped.
This function should be called when user stops the playback of the current track. This function should not be called on pausing.
|
pure virtual |
Sends a list of backdated tracks.
If a scrobbler implements this method, it's also worth making sure SupportsFeature() returns true
for Feature::Backdating.
[in] | list | The list of tracks to send. |
|
pure virtual |
Queries whether a given feature is supported.
[in] | feature | The feature to check. |