LeechCraft  0.6.70-6645-gcd10d7e
Modular cross-platform feature rich live environment.
Media::IHypesProvider Class Referenceabstract

Interface for plugins that support fetching hypes. More...

#include "ihypesprovider.h"

Public Types

enum  HypeType {
  HypeType::NewArtists,
  HypeType::NewTracks,
  HypeType::TopArtists,
  HypeType::TopTracks
}
 The type of the hype. More...
 

Public Member Functions

virtual ~IHypesProvider ()
 
virtual QString GetServiceName () const =0
 Returns the service name. More...
 
virtual bool SupportsHype (HypeType hype)=0
 Returns whether the service supports the given hype type. More...
 
virtual void RequestHype (HypeType type)=0
 Updates the list of hyped artists of the given type. More...
 

Protected Member Functions

virtual void gotHypedArtists (const QList< HypedArtistInfo > &artists, HypeType type)=0
 Emitted when the list of hyped artists is updated. More...
 
virtual void gotHypedTracks (const QList< HypedTrackInfo > &tracks, HypeType type)=0
 Emitted when the list of hyped tracks is updated. More...
 

Detailed Description

Interface for plugins that support fetching hypes.

Hypes are either popular tracks and artists or those who gain a lot of popularity right now.

Fetching hypes is asynchronous in nature, so one should request updating the hypes list via RequestHype() method for each hype type one is interesting in, and then listen to gotHypedArtists() and gotHypedTracks() signals correspondingly.

Definition at line 166 of file ihypesprovider.h.

Member Enumeration Documentation

The type of the hype.

Enumerator
NewArtists 

New artists rapidly growing in popularity.

NewTracks 

New tracks rapidly growing in popularity.

TopArtists 

Top artists.

TopTracks 

Top tracks.

Definition at line 182 of file ihypesprovider.h.

Constructor & Destructor Documentation

virtual Media::IHypesProvider::~IHypesProvider ( )
inlinevirtual

Definition at line 169 of file ihypesprovider.h.

Member Function Documentation

virtual QString Media::IHypesProvider::GetServiceName ( ) const
pure virtual

Returns the service name.

This string returns a human-readable string with the service name, like "Last.FM".

Returns
The human-readable service name.
virtual void Media::IHypesProvider::gotHypedArtists ( const QList< HypedArtistInfo > &  artists,
HypeType  type 
)
protectedpure virtual

Emitted when the list of hyped artists is updated.

This signal is emitted when the list of hyped artists is updated for the given hype type.

Parameters
[out]artistsThe list of the artists for the given hype type.
[out]typeThe type of the hype.
virtual void Media::IHypesProvider::gotHypedTracks ( const QList< HypedTrackInfo > &  tracks,
HypeType  type 
)
protectedpure virtual

Emitted when the list of hyped tracks is updated.

This signal is emitted when the list of hyped tracks is updated for the given hype type.

Parameters
[out]tracksThe list of the tracks for the given hype type.
[out]typeThe type of the hype.
virtual void Media::IHypesProvider::RequestHype ( HypeType  type)
pure virtual

Updates the list of hyped artists of the given type.

Parameters
[in]typeThe type of the hype to update.
virtual bool Media::IHypesProvider::SupportsHype ( HypeType  hype)
pure virtual

Returns whether the service supports the given hype type.

Parameters
[in]hypeThe hype type to query.
Returns
Whether the service supports this hype type.

The documentation for this class was generated from the following file: