LeechCraft  0.6.70-10870-g558588d6ec
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...
 
using HypeQueryResult_t = LeechCraft::Util::Either< QString, HypedInfo_t >
 

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 QFuture< HypeQueryResult_tRequestHype (HypeType type)=0
 Updates the list of hyped artists of the given type. 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 173 of file ihypesprovider.h.

Member Typedef Documentation

◆ HypeQueryResult_t

Member Enumeration Documentation

◆ HypeType

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 191 of file ihypesprovider.h.

Constructor & Destructor Documentation

◆ ~IHypesProvider()

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

Definition at line 176 of file ihypesprovider.h.

Member Function Documentation

◆ GetServiceName()

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.

◆ RequestHype()

virtual QFuture<HypeQueryResult_t> 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.

◆ SupportsHype()

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: