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

Interface for plugins providing radio stations. More...

#include "iradiostationprovider.h"

Public Member Functions

virtual ~IRadioStationProvider ()
 
virtual IRadioStation_ptr GetRadioStation (const QModelIndex &item, const QString &query)=0
 Returns a radio station for the given item and query. More...
 
virtual QList< QAbstractItemModel * > GetRadioListItems () const =0
 Returns the list of stations provided by this plugin. More...
 
virtual void RefreshItems (const QList< QModelIndex > &)=0
 Refreshes the list of radio items. More...
 

Detailed Description

Interface for plugins providing radio stations.

Plugins that provide access to radio stations, either static like Icecast streams or dynamic like library radio or similar artists radio in Last.FM should implement this interface.

See also
IRestorableRadioStationProvider

Definition at line 161 of file iradiostationprovider.h.

Constructor & Destructor Documentation

◆ ~IRadioStationProvider()

virtual Media::IRadioStationProvider::~IRadioStationProvider ( )
inlinevirtual

Definition at line 164 of file iradiostationprovider.h.

Member Function Documentation

◆ GetRadioListItems()

virtual QList<QAbstractItemModel*> Media::IRadioStationProvider::GetRadioListItems ( ) const
pure virtual

Returns the list of stations provided by this plugin.

The returned items should have proper text and icon set, as well as the RadioType in the RadioItemRole::ItemType data role.

The returned items will typically have children and could be filled and refreshed dynamically, so it is suggested to add them as is to a QStandardItemModel.

The ownership of the items is not passed to the caller, they still belong to the provider plugin.

Returns
The list of root items.

◆ GetRadioStation()

virtual IRadioStation_ptr Media::IRadioStationProvider::GetRadioStation ( const QModelIndex &  item,
const QString &  query 
)
pure virtual

Returns a radio station for the given item and query.

The item should be the one of returned from the GetRadioListItems() method or its child. The query is only used for RadioType::SimilarArtists and RadioType::GlobalTag radio station types, where it is the source artist name and tag name correspondingly. Otherwise it can be any string and shouldn't be taken into account.

Parameters
[in]itemThe item identifying the radio station.
[in]queryThe additional user input, if applicable.
Returns
The radio station object.

◆ RefreshItems()

virtual void Media::IRadioStationProvider::RefreshItems ( const QList< QModelIndex > &  )
pure virtual

Refreshes the list of radio items.


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