Ticket #11182: 0001-Trigger-system-events-when-devices-connect-and-disco.patch

File 0001-Trigger-system-events-when-devices-connect-and-disco.patch, 2.7 KB (added by Dave Badia <dbadia@…>, 10 years ago)

Updated patch

  • mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp

    From d61c460c0d9f0cf249c6c4e146495ae4b8f95e27 Mon Sep 17 00:00:00 2001
    From: Dave Badia <dbadia@gmail.com>
    Date: Thu, 20 Mar 2014 17:21:56 -0400
    Subject: [PATCH] Trigger system events when devices connect and disconnect to
     AirPlay and AirTunes
    
    ---
     mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp | 2 ++
     mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp    | 2 ++
     2 files changed, 4 insertions(+)
    
    diff --git a/mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp b/mythtv/libs/libmythtv/AirPlay/mythairplayserver.cpp
    index f6e1f15..6035493 100644
    a b void MythAirplayServer::newConnection(QTcpSocket *client) 
    508508    LOG(VB_GENERAL, LOG_INFO, LOC + QString("New connection from %1:%2")
    509509        .arg(client->peerAddress().toString()).arg(client->peerPort()));
    510510
     511    gCoreContext->SendSystemEvent(QString("AIRPLAY_NEW_CONNECTION"));
    511512    m_sockets.append(client);
    512513    connect(client, SIGNAL(disconnected()), this, SLOT(deleteConnection()));
    513514    connect(client, SIGNAL(readyRead()), this, SLOT(read()));
    void MythAirplayServer::deleteConnection(QTcpSocket *socket) 
    531532    // must have lock
    532533    LOG(VB_GENERAL, LOG_INFO, LOC + QString("Removing connection %1:%2")
    533534        .arg(socket->peerAddress().toString()).arg(socket->peerPort()));
     535    gCoreContext->SendSystemEvent(QString("AIRPLAY_DELETE_CONNECTION"));
    534536    m_sockets.removeOne(socket);
    535537
    536538    QByteArray remove;
  • mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp

    diff --git a/mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp b/mythtv/libs/libmythtv/AirPlay/mythraopdevice.cpp
    index 76fa552..88ef875 100644
    a b void MythRAOPDevice::newConnection(QTcpSocket *client) 
    210210    LOG(VB_GENERAL, LOG_INFO, LOC + QString("New connection from %1:%2")
    211211        .arg(client->peerAddress().toString()).arg(client->peerPort()));
    212212
     213    gCoreContext->SendSystemEvent(QString("AIRTUNES_NEW_CONNECTION"));
    213214    MythNotification n(tr("New Connection"), tr("AirTunes"),
    214215                       tr("from %1:%2").arg(client->peerAddress().toString()).arg(client->peerPort()));
    215216    // Don't show it during playback
    void MythRAOPDevice::deleteClient(void) 
    241242    QList<MythRAOPConnection *>::iterator it = m_clients.begin();
    242243
    243244    MythNotification n(tr("Client disconnected"), tr("AirTunes"));
     245    gCoreContext->SendSystemEvent(QString("AIRTUNES_DELETE_CONNECTION"));
    244246    // Don't show it during playback
    245247    n.SetVisibility(n.GetVisibility() & ~MythNotification::kPlayback);
    246248    GetNotificationCenter()->Queue(n);