Sayonara Player
Public Member Functions | List of all members
Cover::Fetcher::Base Class Referenceabstract

#include <CoverFetcherInterface.h>

Detailed Description

The CoverFetcherInterface interface.

Public Member Functions

virtual bool can_fetch_cover_directly () const =0
 Can the cover be fetched from the adress without starting a two-stage query? More...
 
virtual QStringList calc_addresses_from_website (const QByteArray &website) const =0
 Get addresses from the downloaded website. If can_fetch_cover_directly returns true, this method is not called. More...
 
virtual QString keyword () const =0
 get name of CoverFetcherInterface like e.g. Discogs More...
 
virtual QString artist_address (const QString &artist) const =0
 Get the artist search url. This is called if is_artist_supported returns true. More...
 
virtual QString album_address (const QString &artist, const QString &album) const =0
 Get the album search url. This is called if is_album_supported returns true. More...
 
virtual QString search_address (const QString &str) const =0
 Get a custom search address This is called if is_search_supported returns true. More...
 
virtual bool is_search_supported () const =0
 Is text search supported. More...
 
virtual bool is_album_supported () const =0
 is album search supported More...
 
virtual bool is_artist_supported () const =0
 is artist search supported More...
 
virtual int estimated_size () const =0
 get_estimated_size. Rough image size of the CoverFetchInterface More...
 

Member Function Documentation

◆ album_address()

virtual QString Cover::Fetcher::Base::album_address ( const QString &  artist,
const QString &  album 
) const
pure virtual

Get the album search url. This is called if is_album_supported returns true.

Parameters
artistartist name
albumalbum name
Returns

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ artist_address()

virtual QString Cover::Fetcher::Base::artist_address ( const QString &  artist) const
pure virtual

Get the artist search url. This is called if is_artist_supported returns true.

Parameters
artistartist name
Returns

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ calc_addresses_from_website()

virtual QStringList Cover::Fetcher::Base::calc_addresses_from_website ( const QByteArray &  website) const
pure virtual

Get addresses from the downloaded website. If can_fetch_cover_directly returns true, this method is not called.

Parameters
websitewebsite data
Returns

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ can_fetch_cover_directly()

virtual bool Cover::Fetcher::Base::can_fetch_cover_directly ( ) const
pure virtual

Can the cover be fetched from the adress without starting a two-stage query?

Returns

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ estimated_size()

virtual int Cover::Fetcher::Base::estimated_size ( ) const
pure virtual

get_estimated_size. Rough image size of the CoverFetchInterface

Returns
e.g. 300px

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ is_album_supported()

virtual bool Cover::Fetcher::Base::is_album_supported ( ) const
pure virtual

is album search supported

Returns
true if album search is supported

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ is_artist_supported()

virtual bool Cover::Fetcher::Base::is_artist_supported ( ) const
pure virtual

is artist search supported

Returns
true if artist search is supported

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ is_search_supported()

virtual bool Cover::Fetcher::Base::is_search_supported ( ) const
pure virtual

Is text search supported.

Returns
true, if free text search is supported

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ keyword()

virtual QString Cover::Fetcher::Base::keyword ( ) const
pure virtual

get name of CoverFetcherInterface like e.g. Discogs

Returns

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

◆ search_address()

virtual QString Cover::Fetcher::Base::search_address ( const QString &  str) const
pure virtual

Get a custom search address This is called if is_search_supported returns true.

Parameters
strsearch string
Returns

Implemented in Cover::Fetcher::Standard, Cover::Fetcher::Google, Cover::Fetcher::Discogs, and Cover::Fetcher::LastFM.

Inheritance diagram for Cover::Fetcher::Base:
Cover::Fetcher::Discogs Cover::Fetcher::Google Cover::Fetcher::LastFM Cover::Fetcher::Standard