LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
Media::IArtistBioFetcher Class Referenceabstract

Interface for plugins supporting fetching artist biography. More...

#include "iartistbiofetcher.h"

Public Types

using Result_t = LC::Util::Either< QString, ArtistBio >
 The result of an artist biography search query. More...
 

Public Member Functions

virtual ~IArtistBioFetcher ()
 
virtual QString GetServiceName () const =0
 Returns the service name. More...
 
virtual QFuture< Result_tRequestArtistBio (const QString &artist, bool additionalImages=true)=0
 Requests the biography of the given artist. More...
 

Detailed Description

Interface for plugins supporting fetching artist biography.

Plugins that support fetching artist biography from the sources Last.FM should implement this interface.

Definition at line 80 of file iartistbiofetcher.h.

Member Typedef Documentation

◆ Result_t

The result of an artist biography search query.

The result of an artist biography search query is either a string with a human-readable error text, or a ArtistBio object.

See also
ArtistBio

Definition at line 92 of file iartistbiofetcher.h.

Constructor & Destructor Documentation

◆ ~IArtistBioFetcher()

virtual Media::IArtistBioFetcher::~IArtistBioFetcher ( )
inlinevirtual

Definition at line 83 of file iartistbiofetcher.h.

Member Function Documentation

◆ GetServiceName()

virtual QString Media::IArtistBioFetcher::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.

◆ RequestArtistBio()

virtual QFuture<Result_t> Media::IArtistBioFetcher::RequestArtistBio ( const QString &  artist,
bool  additionalImages = true 
)
pure virtual

Requests the biography of the given artist.

This function initiates a search for artist biography and returns a future with the biography search result.

Parameters
[in]artistThe artist name.
[in]additionalImagesWhether additional images for the ArtistBio::OtherImages_ field should be requested.
Returns
The pending biography future.

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