21#ifndef STREAM_WRITER_H
22#define STREAM_WRITER_H
24#include "StreamHttpParser.h"
25#include "Interfaces/Engine/AudioDataReceiver.h"
26#include "Utils/Pimpl.h"
48 void sigNewConnection(
const QString&
ip);
52 enum class Type : uint8_t
135 void socketDisconnected();
140using StreamWriterPtr = std::shared_ptr<StreamWriter>;
The RawSoundReceiver interface.
Definition: AudioDataReceiver.h:59
Global handler for current playback state (Singleton)
Definition: PlayManager.h:36
Definition: AudioDataProvider.h:55
HttpAnswer
The HttpAnswer enum.
Definition: StreamHttpParser.h:40
The StreamWriter class. This class is the interface between StreamDataSender and StreamServer....
Definition: StreamWriter.h:43
bool sendHtml5()
send a html5 website (see StreamDataSender)
void disconnect()
disconnect a client socket
QString ip() const
get client ip address
bool sendFavicon()
Send the http favicon (see StreamDataSender)
void writeAudioData(const QByteArray &data) override
new audio data has arrived and has to be forwarded to the socket
bool sendMetadata()
Send track information (see StreamDataSender)
StreamWriter(PlayManager *playManager, RawAudioDataProvider *audioDataProvider, QTcpSocket *socket, const QString &ip)
StreamWriter.
bool sendBackground()
Send website background (see StreamDataSender)
bool sendPlaylist()
Send a m3u playlist (see StreamDataSender)
void dismiss()
stop sending sound over the client socket
bool sendHeader(bool reject)
send a appropriate header based on the type of request (see StreamDataSender)