MythTV  master
Public Slots | Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MythRAOPDevice Class Reference

#include <mythraopdevice.h>

Inheritance diagram for MythRAOPDevice:
Inheritance graph
[legend]
Collaboration diagram for MythRAOPDevice:
Collaboration graph
[legend]

Public Slots

void TVPlaybackStarting (void)
 

Public Member Functions

 MythRAOPDevice ()
 
void DeleteAllClients (MythRAOPConnection *keep)
 
- Public Member Functions inherited from ServerPool
 ServerPool (QObject *parent=nullptr)
 
 ~ServerPool (void)
 
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)
 
int maxPendingConnections (void)
 
void setMaxPendingConnections (int n)
 
quint16 serverPort (void)
 
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 MythRAOPDeviceRAOPSharedInstance (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 newConnection (QTcpSocket *client)
 
void deleteClient ()
 

Private Member Functions

 ~MythRAOPDevice (void) override
 
void Teardown (void)
 
bool RegisterForBonjour (void)
 

Private Attributes

QString m_name {"MythTV"}
 
QByteArray m_hardwareId
 
BonjourRegisterm_bonjour {nullptr}
 
bool m_valid {false}
 
QMutex * m_lock {nullptr}
 
int m_setupPort {5000}
 
int m_basePort {0}
 
QList< MythRAOPConnection * > m_clients
 

Static Private Attributes

static MythRAOPDevicegMythRAOPDevice = nullptr
 
static QMutex * gMythRAOPDeviceMutex = new QMutex(QMutex::Recursive)
 
static MThreadgMythRAOPDeviceThread = 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 (qt_socket_fd_t socket)
 

Detailed Description

Definition at line 16 of file mythraopdevice.h.

Constructor & Destructor Documentation

◆ MythRAOPDevice()

MythRAOPDevice::MythRAOPDevice ( )

Definition at line 86 of file mythraopdevice.cpp.

Referenced by Create().

◆ ~MythRAOPDevice()

MythRAOPDevice::~MythRAOPDevice ( void  )
overrideprivate

Definition at line 92 of file mythraopdevice.cpp.

Member Function Documentation

◆ Create()

bool MythRAOPDevice::Create ( void  )
static

Definition at line 23 of file mythraopdevice.cpp.

Referenced by main().

◆ Cleanup()

void MythRAOPDevice::Cleanup ( void  )
static

Definition at line 69 of file mythraopdevice.cpp.

◆ RAOPSharedInstance()

static MythRAOPDevice* MythRAOPDevice::RAOPSharedInstance ( void  )
inlinestatic

Definition at line 23 of file mythraopdevice.h.

◆ DeleteAllClients()

void MythRAOPDevice::DeleteAllClients ( MythRAOPConnection keep)

Definition at line 262 of file mythraopdevice.cpp.

Referenced by Teardown(), and TVPlaybackStarting().

◆ TVPlaybackStarting

void MythRAOPDevice::TVPlaybackStarting ( void  )
slot

Definition at line 199 of file mythraopdevice.cpp.

Referenced by newConnection().

◆ Start

void MythRAOPDevice::Start ( void  )
privateslot

Definition at line 113 of file mythraopdevice.cpp.

Referenced by Create().

◆ Stop

void MythRAOPDevice::Stop ( void  )
privateslot

Definition at line 148 of file mythraopdevice.cpp.

Referenced by Create().

◆ newConnection

void MythRAOPDevice::newConnection ( QTcpSocket *  client)
privateslot

Definition at line 205 of file mythraopdevice.cpp.

Referenced by Start().

◆ deleteClient

void MythRAOPDevice::deleteClient ( void  )
privateslot

Definition at line 236 of file mythraopdevice.cpp.

Referenced by newConnection().

◆ Teardown()

void MythRAOPDevice::Teardown ( void  )
private

Definition at line 98 of file mythraopdevice.cpp.

Referenced by Stop().

◆ RegisterForBonjour()

bool MythRAOPDevice::RegisterForBonjour ( void  )
private

Definition at line 153 of file mythraopdevice.cpp.

Referenced by Start().

Member Data Documentation

◆ gMythRAOPDevice

MythRAOPDevice * MythRAOPDevice::gMythRAOPDevice = nullptr
staticprivate

Definition at line 43 of file mythraopdevice.h.

Referenced by Cleanup(), and Create().

◆ gMythRAOPDeviceMutex

QMutex * MythRAOPDevice::gMythRAOPDeviceMutex = new QMutex(QMutex::Recursive)
staticprivate

Definition at line 44 of file mythraopdevice.h.

Referenced by Cleanup(), and Create().

◆ gMythRAOPDeviceThread

MThread * MythRAOPDevice::gMythRAOPDeviceThread = nullptr
staticprivate

Definition at line 45 of file mythraopdevice.h.

Referenced by Cleanup(), and Create().

◆ m_name

QString MythRAOPDevice::m_name {"MythTV"}
private

Definition at line 48 of file mythraopdevice.h.

Referenced by RegisterForBonjour().

◆ m_hardwareId

QByteArray MythRAOPDevice::m_hardwareId
private

Definition at line 49 of file mythraopdevice.h.

Referenced by MythRAOPDevice(), newConnection(), and RegisterForBonjour().

◆ m_bonjour

BonjourRegister* MythRAOPDevice::m_bonjour {nullptr}
private

Definition at line 50 of file mythraopdevice.h.

Referenced by RegisterForBonjour(), and Teardown().

◆ m_valid

bool MythRAOPDevice::m_valid {false}
private

Definition at line 51 of file mythraopdevice.h.

Referenced by Start(), and Teardown().

◆ m_lock

QMutex* MythRAOPDevice::m_lock {nullptr}
private

◆ m_setupPort

int MythRAOPDevice::m_setupPort {5000}
private

Definition at line 53 of file mythraopdevice.h.

Referenced by RegisterForBonjour(), and Start().

◆ m_basePort

int MythRAOPDevice::m_basePort {0}
private

Definition at line 54 of file mythraopdevice.h.

Referenced by RegisterForBonjour(), and Start().

◆ m_clients

QList<MythRAOPConnection*> MythRAOPDevice::m_clients
private

Definition at line 55 of file mythraopdevice.h.

Referenced by DeleteAllClients(), deleteClient(), and newConnection().


The documentation for this class was generated from the following files: