21 #ifndef STREAM_WRITER_H 22 #define STREAM_WRITER_H 24 #include "Helper/Settings/SayonaraClass.h" 25 #include "Interfaces/RawSoundReceiver/RawSoundReceiverInterface.h" 26 #include "StreamHttpParser.h" 29 #include <QHostAddress> 54 enum class Type : quint8 {
62 void sig_new_connection(
const QString& ip);
70 QTcpSocket* _socket=
nullptr;
75 QString _stream_title;
78 StreamWriter::Type _type;
178 void socket_disconnected();
179 void data_available();
182 typedef std::shared_ptr<StreamWriter> StreamWriterPtr;
The StreamWriter class. This class is the interface between StreamDataSender and StreamServer. It watches the client socket and spreads data to its client.
Definition: StreamWriter.h:44
StreamWriter(QTcpSocket *socket, const QString &ip, const MetaData &md)
StreamWriter.
void new_audio_data(const uchar *data, quint64 size) override
new audio data has arrived and has to be forwarded to the socket
The StreamDataSender class. This class is used for sending the raw bytes.
Definition: StreamDataSender.h:31
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:31
Type get_type() const
get connection type
bool send_playlist()
Send a m3u playlist (see StreamDataSender)
void dismiss()
stop sending sound over the client socket
void disconnect()
disconnect a client socket
The RawSoundReceiver interface.
Definition: RawSoundReceiverInterface.h:32
bool send_html5()
send a html5 website (see StreamDataSender)
Definition: EngineHandler.h:36
Parses requests out of the Client.
Definition: StreamHttpParser.h:33
void change_track(const MetaData &md)
send new icy data to clients, and send new metadata to remote controls.
bool send_header(bool reject)
send a appropriate header based on the type of request (see StreamDataSender)
bool send_bg()
Send website background (see StreamDataSender)
HttpAnswer
The HttpAnswer enum.
Definition: StreamHttpParser.h:40
bool send_favicon()
Send the http favicon (see StreamDataSender)
int get_sd() const
get raw socket descriptor
QString get_ip() const
get client ip address
bool send_metadata()
Send track information (see StreamDataSender)