LeechCraft  0.6.70-13729-g7046a9d2a7
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 = LC::Util::Either< QString, HypedInfo_t >
 The result of a hyped entity list query. 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 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.

Definition at line 168 of file ihypesprovider.h.

Member Typedef Documentation

◆ HypeQueryResult_t

The result of a hyped entity list query.

The result of a hyped entity list query is either a string with a human-readable error text, or the list of the hyped items.

Definition at line 178 of file ihypesprovider.h.

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 171 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.
Returns
The future holding the hype query result.

◆ 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: