MythTV master
mythraopdevice.h
Go to the documentation of this file.
1#ifndef MYTHRAOPDEVICE_H
2#define MYTHRAOPDEVICE_H
3
4#include <QObject>
5#include <QRecursiveMutex>
6
9
10class MThread;
11class BonjourRegister;
13
14static constexpr int RAOP_PORT_RANGE { 100 };
15
17{
18 Q_OBJECT
19
20 public:
21 static bool Create(void);
22 static void Cleanup(void);
23 static MythRAOPDevice *RAOPSharedInstance(void) { return gMythRAOPDevice; }
24
26 void DeleteAllClients(MythRAOPConnection *keep);
27
28 public slots:
29 void TVPlaybackStarting(void);
30
31 private slots:
32 void Start();
33 void Stop();
34 void newRaopConnection(QTcpSocket *client);
35 void deleteClient();
36
37 private:
38 ~MythRAOPDevice(void) override;
39 void Teardown(void);
40 bool RegisterForBonjour(void);
41
42 // Globals
44 static QRecursiveMutex *gMythRAOPDeviceMutex;
46
47 // Members
48 QString m_name {"MythTV"};
49 QByteArray m_hardwareId;
50 BonjourRegister *m_bonjour {nullptr};
51 bool m_valid {false};
52 QRecursiveMutex *m_lock {nullptr};
53 int m_setupPort {5000};
54 int m_basePort {0};
55 QList<MythRAOPConnection*> m_clients;
56};
57
58
59#endif // MYTHRAOPDEVICE_H
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
static MythRAOPDevice * RAOPSharedInstance(void)
QList< MythRAOPConnection * > m_clients
static QRecursiveMutex * gMythRAOPDeviceMutex
static MythRAOPDevice * gMythRAOPDevice
QByteArray m_hardwareId
static MThread * gMythRAOPDeviceThread
Manages a collection of sockets listening on different ports.
Definition: serverpool.h:60
static constexpr int RAOP_PORT_RANGE
#define MTV_PUBLIC
Definition: mythtvexp.h:15