1 #ifndef MYTHAIRPLAYSERVER_H
2 #define MYTHAIRPLAYSERVER_H
5 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
8 #include <QRecursiveMutex>
27 const QString& nonce,
const QString& password,
77 static bool Create(
void);
78 static void Cleanup(
void);
80 {
return gMythAirplayServer; }
83 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
84 m_lock(new QMutex(QMutex::Recursive))
86 m_lock(new QRecursiveMutex())
93 void newAirplayConnection(QTcpSocket *client);
94 void deleteConnection();
102 static QByteArray StatusToString(
uint16_t status);
104 static void GetPlayerStatus(
bool &playing,
float &speed,
105 double &position,
double &duration,
107 static QString GetMacAddress();
108 bool SendReverseEvent(QByteArray &session,
AirplayEvent event);
109 void SendResponse(QTcpSocket *socket,
110 uint16_t status,
const QByteArray& header,
111 const QByteArray& content_type,
const QString& body);
113 void deleteConnection(QTcpSocket *socket);
114 void DisconnectAllClients(
const QByteArray &session);
115 void StopSession(
const QByteArray &session);
116 void StartPlayback(
const QString &pathname);
117 void StopPlayback(
void);
118 void SeekPosition(uint64_t position);
119 void PausePlayback(
void);
120 void UnpausePlayback(
void);
121 void HideAllPhotos(
void);
125 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
126 static QMutex *gMythAirplayServerMutex;
133 QString m_name {
"MythTV"};
135 bool m_valid {
false};
136 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
137 QMutex *m_lock {
nullptr};
139 QRecursiveMutex *m_lock {
nullptr};
141 int m_setupPort {5100};
153 QTimer *m_serviceRefresh {
nullptr};
156 #endif // MYTHAIRPLAYSERVER_H