LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
Media::IPendingSimilarArtists Class Referenceabstract

Pending similar artists request handle. More...

#include "ipendingsimilarartists.h"

Public Member Functions

virtual ~IPendingSimilarArtists ()
 
virtual QObject * GetQObject ()=0
 Returns this object as a QObject. More...
 
virtual QString GetSourceArtistName () const =0
 Returns the artist for which others are being searched. More...
 
virtual SimilarityInfos_t GetSimilar () const =0
 Returns the list of similar artists. More...
 

Protected Member Functions

virtual void ready ()=0
 Emitted when the list is ready and fetched. More...
 
virtual void error ()=0
 Emitted when there is an error fetching the list. More...
 

Detailed Description

Pending similar artists request handle.

Interface to similar artists search (and other, eh, similar searches like recommended artists request). A descendant of this class is returned from ISimilarArtists::GetSimilarArtists() and IRecommendedArtists::RequestRecommended() methods.

This class has some signals (ready() and error()), and one can use the GetQObject() method to get an object of this class as a QObject and connect to those signals.

Note
The object of this class should schedule its deletion (via QObject::deleteLater(), for example) after ready() or error() signal is emitted. Thus the calling code should never delete it explicitly, neither it should use this object after ready() or error() signals or connect to this signals via Qt::QueuedConnection.
See also
ISimilarArtists, IRecommendedArtists

Definition at line 57 of file ipendingsimilarartists.h.

Constructor & Destructor Documentation

◆ ~IPendingSimilarArtists()

virtual Media::IPendingSimilarArtists::~IPendingSimilarArtists ( )
inlinevirtual

Definition at line 60 of file ipendingsimilarartists.h.

Member Function Documentation

◆ error()

virtual void Media::IPendingSimilarArtists::error ( )
protectedpure virtual

Emitted when there is an error fetching the list.

The object will be invalid after this signal is emitted and the event loop is run.

◆ GetQObject()

virtual QObject* Media::IPendingSimilarArtists::GetQObject ( )
pure virtual

Returns this object as a QObject.

This function can be used to connect to the signals of this class.

Returns
This object as a QObject.

◆ GetSimilar()

virtual SimilarityInfos_t Media::IPendingSimilarArtists::GetSimilar ( ) const
pure virtual

Returns the list of similar artists.

This function returns the fetched list of similar artists, or an empty list if search is not complete or an error occured.

Returns
The list of similar artists.

◆ GetSourceArtistName()

virtual QString Media::IPendingSimilarArtists::GetSourceArtistName ( ) const
pure virtual

Returns the artist for which others are being searched.

For some requests this doesn't make sense (like for the recommended artists), so this method returns a null string in these cases.

Returns
The name of the artist for which other artists are searched, if applicable.

◆ ready()

virtual void Media::IPendingSimilarArtists::ready ( )
protectedpure virtual

Emitted when the list is ready and fetched.

The object will be invalid after this signal is emitted and the event loop is run.


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