diff --git a/mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp b/mythtv/libs/libmythtv/AirPlay/mythraopconnection.cpp
index 4b0ca4d..89ca8d2 100644
a
|
b
|
void MythRAOPConnection::ProcessRequest(const QStringList &header, |
1057 | 1057 | *m_textStream << base64.trimmed() << "\r\n"; |
1058 | 1058 | } |
1059 | 1059 | |
| 1060 | QString responseData; |
1060 | 1061 | if (option == "OPTIONS") |
1061 | 1062 | { |
1062 | 1063 | *m_textStream << "Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, " |
… |
… |
void MythRAOPConnection::ProcessRequest(const QStringList &header, |
1410 | 1411 | } |
1411 | 1412 | } |
1412 | 1413 | } |
| 1414 | else if (option == "GET_PARAMETER") |
| 1415 | { |
| 1416 | if (tags.contains("Content-Type")) |
| 1417 | { |
| 1418 | if (tags["Content-Type"] == "text/parameters") |
| 1419 | { |
| 1420 | QStringList lines = splitLines(content); |
| 1421 | *m_textStream << "Content-Type: text/parameters\r\n"; |
| 1422 | foreach (QString line, lines) |
| 1423 | { |
| 1424 | if (line == "volume") |
| 1425 | { |
| 1426 | responseData += "volume: -0.000000\r\n"; |
| 1427 | } |
| 1428 | } |
| 1429 | } |
| 1430 | } |
| 1431 | } |
1413 | 1432 | else if (option == "TEARDOWN") |
1414 | 1433 | { |
1415 | 1434 | m_socket->disconnectFromHost(); |
… |
… |
void MythRAOPConnection::ProcessRequest(const QStringList &header, |
1420 | 1439 | LOG(VB_PLAYBACK, LOG_DEBUG, LOC + QString("Command not handled: %1") |
1421 | 1440 | .arg(option)); |
1422 | 1441 | } |
1423 | | FinishResponse(m_textStream, m_socket, option, tags["CSeq"]); |
| 1442 | FinishResponse(m_textStream, m_socket, option, tags["CSeq"], responseData); |
1424 | 1443 | } |
1425 | 1444 | |
1426 | 1445 | void MythRAOPConnection::FinishAuthenticationResponse(_NetStream *stream, |
… |
… |
void MythRAOPConnection::FinishAuthenticationResponse(_NetStream *stream, |
1442 | 1461 | } |
1443 | 1462 | |
1444 | 1463 | void MythRAOPConnection::FinishResponse(_NetStream *stream, QTcpSocket *socket, |
1445 | | QString &option, QString &cseq) |
| 1464 | QString &option, QString &cseq, QString &responseData) |
1446 | 1465 | { |
1447 | 1466 | if (!stream) |
1448 | 1467 | return; |
1449 | 1468 | *stream << "Server: AirTunes/130.14\r\n"; |
1450 | 1469 | *stream << "CSeq: " << cseq << "\r\n"; |
| 1470 | if (responseData.length()) |
| 1471 | *stream << "Content-Length: " << QString::number(responseData.length()) << "\r\n"; |
1451 | 1472 | *stream << "\r\n"; |
| 1473 | if (responseData.length()) |
| 1474 | *stream << responseData; |
1452 | 1475 | stream->flush(); |
1453 | 1476 | LOG(VB_PLAYBACK, LOG_DEBUG, LOC + QString("Finished %1 %2 , Send: %3") |
1454 | 1477 | .arg(option).arg(cseq).arg(socket->flush())); |
diff --git a/mythtv/libs/libmythtv/AirPlay/mythraopconnection.h b/mythtv/libs/libmythtv/AirPlay/mythraopconnection.h
index a296679..a6df640 100644
a
|
b
|
class MTV_PUBLIC MythRAOPConnection : public QObject |
80 | 80 | void ProcessRequest(const QStringList &header, |
81 | 81 | const QByteArray &content); |
82 | 82 | void FinishResponse(_NetStream *stream, QTcpSocket *socket, |
83 | | QString &option, QString &cseq); |
| 83 | QString &option, QString &cseq, QString &responseData); |
84 | 84 | void FinishAuthenticationResponse(_NetStream *stream, QTcpSocket *socket, |
85 | 85 | QString &cseq); |
86 | 86 | |