5 #include <QApplication>
28 : m_udpSock(new QUdpSocket)
30 m_udpSock->bind(QHostAddress(QHostAddress::Any), 6000);
43 const QByteArray &data =
"M-SEARCH * HTTP/1.1\r\n"
44 "HOST:239.255.255.250:1900\r\n"
45 "MAN:\"ssdp:discover\"\r\n"
48 m_udpSock->writeDatagram(data, QHostAddress(
"239.255.255.250"), 1900);
61 if(client->server() == server)
88 if(index < 0 || index >= d->m_clients.count())
93 return d->m_clients[index];
116 while(d->m_udpSock->hasPendingDatagrams())
119 datagram.resize(d->m_udpSock->pendingDatagramSize());
120 d->m_udpSock->readDatagram(datagram.data(), datagram.length());
134 qApp->processEvents();
137 d->m_clients.push_back(client);
QDlnaFinder(QObject *parent=nullptr)
The class of the dlna client.
The class of the dlna finder.
static constexpr const char * DEFAULT_ROUTER_IP
QStringList clientNames() const
QList< QDlnaClient * > clients() const
QDlnaClient * client(int index) const
bool findClient(const QString &server)
QList< QDlnaClient * > m_clients
The class of the dlna finder private.
#define TTK_INIT_PRIVATE(Class)
The class of the ttk private base.
QString serverName() const