Ticket #11182: raop-sys-event

File raop-sys-event, 1.3 KB (added by Dave Badia <dbadia@…>, 8 years ago)

patch

Line 
1Send system events when devices connect and disconnect to RAOP
2
3From: Dave Badia <dbadia@gmail.com>
4
5
6---
7 mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp |    4 ++--
8 1 files changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp b/mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp
11index 3b98e31..0b1e1c8 100644
12--- a/mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp
13+++ b/mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp
14@@ -205,7 +205,7 @@ void MythRAOPDevice::newConnection(QTcpSocket *client)
15     QMutexLocker locker(m_lock);
16     LOG(VB_GENERAL, LOG_INFO, LOC + QString("New connection from %1:%2")
17         .arg(client->peerAddress().toString()).arg(client->peerPort()));
18-
19+    gCoreContext->SendSystemEvent(QString("RAOP_NEW_CONNECTION"));
20     MythRAOPConnection *obj =
21             new MythRAOPConnection(this, client, m_hardwareId, 6000);
22 
23@@ -229,7 +229,7 @@ void MythRAOPDevice::deleteClient(void)
24     LOG(VB_GENERAL, LOG_DEBUG, LOC + "Entering DeleteClient.");
25     QMutexLocker locker(m_lock);
26     QList<MythRAOPConnection *>::iterator it = m_clients.begin();
27-
28+    gCoreContext->SendSystemEvent(QString("RAOP_DELETE_CONNECTION"));
29     while (it != m_clients.end())
30     {
31         if ((*it)->GetSocket()->state() == QTcpSocket::UnconnectedState)