LeechCraft 0.6.70-17335-ge406ffdcaf
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
iradiostation.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <memory>
12#include <QtPlugin>
13
14class QUrl;
15
16namespace Media
17{
18 struct AudioInfo;
19
43 class Q_DECL_EXPORT IRadioStation
44 {
45 public:
46 virtual ~IRadioStation () {}
47
55 virtual QObject* GetQObject () = 0;
56
61 virtual void RequestNewStream () = 0;
62
67 virtual QString GetRadioName () const = 0;
68 protected:
74 virtual void gotNewStream (const QUrl& url, const AudioInfo& info) = 0;
75
92 virtual void gotPlaylist (const QString& filename, const QString& format) = 0;
93
104 virtual void gotAudioInfos (const QList<AudioInfo>& infos) = 0;
105
110 virtual void gotError (const QString& error) = 0;
111 };
112
115 typedef std::shared_ptr<IRadioStation> IRadioStation_ptr;
116}
117
118Q_DECLARE_INTERFACE (Media::IRadioStation, "org.LeechCraft.Media.IRadioStation/1.0")
Describes a single radio station.
virtual void gotError(const QString &error)=0
Emitted when there is an error.
virtual QObject * GetQObject()=0
Returns this object as a QObject.
virtual void gotAudioInfos(const QList< AudioInfo > &infos)=0
Emitted when just a set of audio infos is available.
virtual void gotPlaylist(const QString &filename, const QString &format)=0
Emitted when a playlist for this radio is fetched.
virtual QString GetRadioName() const =0
Returns the human-readable name of this radio station.
virtual void gotNewStream(const QUrl &url, const AudioInfo &info)=0
Emitted when there is a new audio stream available.
virtual void RequestNewStream()=0
Request a new stream if this is a multistream radio.
std::shared_ptr< IRadioStation > IRadioStation_ptr
A pointer to a shared instance of a IRadioStation.
Describes a single audio track.