Sayonara Player
|
Signals | |
void | sig_error () |
void | sig_data_available () |
Public Member Functions | |
StreamHandlerStreams (QObject *parent=nullptr) | |
bool | get_all_streams (StreamMap &streams) override |
This method should return all stations in database. More... | |
bool | add_stream (const QString &station_name, const QString &url) override |
This method should add a new station to database. If the station already exists, there should be a corresponding error handling. More... | |
bool | delete_stream (const QString &station_name) override |
Delete a station from the database. More... | |
bool | update_url (const QString &station_name, const QString &url) override |
Update the url of a station. More... | |
bool | rename_stream (const QString &station_name, const QString &url) override |
Rename the station. More... | |
bool | parse_station (const QString &url, const QString &station_name) |
Retrieves data from the station and tries to interprete it via the parse_content() method. More... | |
MetaDataList | get_tracks (const QString &station_name) |
get_tracks More... | |
void | save (const QString &station_name, const QString &url) |
Saves the station. Calls the add_stream() method. More... | |
void | clear () |
Clears all station content. | |
Protected Attributes | |
DatabaseConnector * | _db =nullptr |
PlaylistHandler * | _playlist =nullptr |
QMap< QString, MetaDataList > | _station_contents |
QString | _station_name |
bool | _blocked |
|
overridevirtual |
This method should add a new station to database. If the station already exists, there should be a corresponding error handling.
station_name | station name |
url | url |
Implements AbstractStreamHandler.
|
overridevirtual |
Delete a station from the database.
station_name | the station to be deleted |
Implements AbstractStreamHandler.
|
overridevirtual |
This method should return all stations in database.
streams | target StreamMap |
Implements AbstractStreamHandler.
|
inherited |
get_tracks
station_name |
|
inherited |
Retrieves data from the station and tries to interprete it via the parse_content() method.
url | url to retrieve the data from |
station_name | the station name |
|
overridevirtual |
Rename the station.
station_name | new name of the station |
url | old URL of the station |
Implements AbstractStreamHandler.
|
inherited |
Saves the station. Calls the add_stream() method.
station_name | The station name. |
url | the station url. |
|
overridevirtual |
Update the url of a station.
station_name | the station to be updated |
url | the new url |
Implements AbstractStreamHandler.