MythTV
master
|
#include <libmythtv/AirPlay/mythairplayserver.h>
Public Member Functions | |
MythAirplayServer () | |
Public Member Functions inherited from ServerPool | |
ServerPool (QObject *parent=nullptr) | |
~ServerPool (void) override | |
bool | listen (QList< QHostAddress > addrs, quint16 port, bool requireall=true, PoolServerType type=kTCPServer) |
bool | listen (QStringList addrs, quint16 port, bool requireall=true, PoolServerType type=kTCPServer) |
bool | listen (quint16 port, bool requireall=true, PoolServerType type=kTCPServer) |
bool | bind (QList< QHostAddress > addrs, quint16 port, bool requireall=true) |
bool | bind (QStringList addrs, quint16 port, bool requireall=true) |
bool | bind (quint16 port, bool requireall=true) |
qint64 | writeDatagram (const char *data, qint64 size, const QHostAddress &addr, quint16 port) |
qint64 | writeDatagram (const QByteArray &datagram, const QHostAddress &addr, quint16 port) |
bool | isListening (void) const |
int | maxPendingConnections (void) const |
void | setMaxPendingConnections (int n) |
quint16 | serverPort (void) const |
QNetworkProxy | proxy (void) |
void | setProxy (const QNetworkProxy &proxy) |
void | close (void) |
int | tryListeningPort (int baseport, int range=1) |
tryListeningPort More... | |
int | tryBindingPort (int baseport, int range=1) |
tryBindingPort More... | |
Static Public Member Functions | |
static bool | Create (void) |
static void | Cleanup (void) |
static MythAirplayServer * | AirplaySharedInstance (void) |
Static Public Member Functions inherited from ServerPool | |
static void | RefreshDefaultListen (void) |
static QList< QHostAddress > | DefaultListen (void) |
static QList< QHostAddress > | DefaultListenIPv4 (void) |
static QList< QHostAddress > | DefaultListenIPv6 (void) |
static QList< QHostAddress > | DefaultBroadcast (void) |
static QList< QHostAddress > | DefaultBroadcastIPv4 (void) |
static QList< QHostAddress > | DefaultBroadcastIPv6 (void) |
static int | tryListeningPort (QTcpServer *server, int baseport, int range=1, bool *isipv6=nullptr) |
tryListeningPort More... | |
static int | tryBindingPort (QUdpSocket *socket, int baseport, int range=1, bool *isipv6=nullptr) |
tryBindingPort More... | |
Private Slots | |
void | Start () |
void | Stop () |
void | newAirplayConnection (QTcpSocket *client) |
void | deleteConnection () |
void | read (void) |
void | timeout (void) |
Private Member Functions | |
~MythAirplayServer (void) override | |
void | Teardown (void) |
void | HandleResponse (APHTTPRequest *req, QTcpSocket *socket) |
bool | SendReverseEvent (QByteArray &session, AirplayEvent event) |
void | SendResponse (QTcpSocket *socket, uint16_t status, const QByteArray &header, const QByteArray &content_type, const QString &body) |
void | deleteConnection (QTcpSocket *socket) |
void | DisconnectAllClients (const QByteArray &session) |
void | StopSession (const QByteArray &session) |
void | StartPlayback (const QString &pathname) |
void | StopPlayback (void) |
void | SeekPosition (uint64_t position) |
void | PausePlayback (void) |
void | UnpausePlayback (void) |
void | HideAllPhotos (void) |
Static Private Member Functions | |
static QByteArray | StatusToString (uint16_t status) |
static QString | eventToString (AirplayEvent event) |
static void | GetPlayerStatus (bool &playing, float &speed, double &position, double &duration, QString &pathname) |
static QString | GetMacAddress () |
Private Attributes | |
QString | m_name {"MythTV"} |
BonjourRegister * | m_bonjour {nullptr} |
bool | m_valid {false} |
QRecursiveMutex * | m_lock {nullptr} |
int | m_setupPort {5100} |
QList< QTcpSocket * > | m_sockets |
QHash< QByteArray, AirplayConnection > | m_connections |
QString | m_pathname |
QString | m_nonce |
QHash< QTcpSocket *, APHTTPRequest * > | m_incoming |
QTimer * | m_serviceRefresh {nullptr} |
Static Private Attributes | |
static MythAirplayServer * | gMythAirplayServer = nullptr |
static QRecursiveMutex * | gMythAirplayServerMutex = new QRecursiveMutex() |
static MThread * | gMythAirplayServerThread = nullptr |
Additional Inherited Members | |
Signals inherited from ServerPool | |
void | newConnection (QTcpSocket *) |
void | newDatagram (QByteArray, QHostAddress, quint16) |
Protected Slots inherited from ServerPool | |
virtual void | newUdpDatagram (void) |
virtual void | newTcpConnection (qintptr socket) |
Definition at line 68 of file mythairplayserver.h.
|
inline |
Definition at line 78 of file mythairplayserver.h.
Referenced by Create().
|
overrideprivate |
Definition at line 409 of file mythairplayserver.cpp.
|
static |
Definition at line 352 of file mythairplayserver.cpp.
Referenced by main().
|
static |
Definition at line 391 of file mythairplayserver.cpp.
Referenced by anonymous_namespace{mythfrontend.cpp}::cleanup().
|
inlinestatic |
Definition at line 75 of file mythairplayserver.h.
|
privateslot |
Definition at line 450 of file mythairplayserver.cpp.
Referenced by Create().
|
privateslot |
Definition at line 520 of file mythairplayserver.cpp.
Referenced by Create().
|
privateslot |
Definition at line 525 of file mythairplayserver.cpp.
Referenced by Start().
|
privateslot |
Definition at line 538 of file mythairplayserver.cpp.
Referenced by newAirplayConnection().
|
privateslot |
Definition at line 602 of file mythairplayserver.cpp.
Referenced by newAirplayConnection().
|
privateslot |
Definition at line 514 of file mythairplayserver.cpp.
Referenced by Start().
|
private |
Definition at line 415 of file mythairplayserver.cpp.
Referenced by Stop().
|
private |
Definition at line 646 of file mythairplayserver.cpp.
Referenced by read().
|
staticprivate |
Definition at line 633 of file mythairplayserver.cpp.
Referenced by SendResponse().
|
staticprivate |
Definition at line 1076 of file mythairplayserver.cpp.
Referenced by SendReverseEvent().
|
staticprivate |
Definition at line 1089 of file mythairplayserver.cpp.
Referenced by HandleResponse(), and StopSession().
|
staticprivate |
Definition at line 1108 of file mythairplayserver.cpp.
Referenced by HandleResponse(), and Start().
|
private |
Definition at line 1028 of file mythairplayserver.cpp.
Referenced by HandleResponse().
|
private |
Definition at line 980 of file mythairplayserver.cpp.
Referenced by HandleResponse().
|
private |
Definition at line 551 of file mythairplayserver.cpp.
|
private |
Definition at line 1157 of file mythairplayserver.cpp.
Referenced by HandleResponse().
|
private |
Definition at line 1124 of file mythairplayserver.cpp.
Referenced by deleteConnection(), DisconnectAllClients(), and HandleResponse().
|
private |
Definition at line 1212 of file mythairplayserver.cpp.
Referenced by HandleResponse().
|
private |
Definition at line 1232 of file mythairplayserver.cpp.
Referenced by StartPlayback(), and StopSession().
|
private |
Definition at line 1258 of file mythairplayserver.cpp.
Referenced by HandleResponse().
|
private |
Definition at line 1286 of file mythairplayserver.cpp.
Referenced by HandleResponse().
|
private |
Definition at line 1313 of file mythairplayserver.cpp.
Referenced by HandleResponse().
|
private |
Definition at line 1340 of file mythairplayserver.cpp.
Referenced by HandleResponse().
|
staticprivate |
Definition at line 116 of file mythairplayserver.h.
|
staticprivate |
Definition at line 117 of file mythairplayserver.h.
|
staticprivate |
Definition at line 118 of file mythairplayserver.h.
|
private |
Definition at line 121 of file mythairplayserver.h.
Referenced by Start().
|
private |
Definition at line 122 of file mythairplayserver.h.
Referenced by Start(), Teardown(), and timeout().
Definition at line 123 of file mythairplayserver.h.
Referenced by Start(), and Teardown().
|
private |
Definition at line 124 of file mythairplayserver.h.
Referenced by deleteConnection(), DisconnectAllClients(), newAirplayConnection(), read(), Start(), Teardown(), and ~MythAirplayServer().
|
private |
Definition at line 125 of file mythairplayserver.h.
Referenced by Start().
|
private |
Definition at line 126 of file mythairplayserver.h.
Referenced by deleteConnection(), DisconnectAllClients(), newAirplayConnection(), and Teardown().
|
private |
Definition at line 127 of file mythairplayserver.h.
Referenced by deleteConnection(), DisconnectAllClients(), HandleResponse(), HideAllPhotos(), SendReverseEvent(), and StopSession().
|
private |
Definition at line 128 of file mythairplayserver.h.
Referenced by HandleResponse(), PausePlayback(), SeekPosition(), StopPlayback(), StopSession(), and UnpausePlayback().
|
private |
Definition at line 131 of file mythairplayserver.h.
Referenced by HandleResponse().
|
private |
Definition at line 134 of file mythairplayserver.h.
Referenced by deleteConnection(), DisconnectAllClients(), read(), SendResponse(), and Teardown().
|
private |
Definition at line 137 of file mythairplayserver.h.
Referenced by Start(), Teardown(), and timeout().