summaryrefslogtreecommitdiff
path: root/ci.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-05-12 09:17:39 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-05-12 09:17:39 +0200
commitce42e42ed7a4ef206196f68f698ba6cce2b5b7de (patch)
tree7d292dcd2b32b64391b068964d4d2a6ea1a64098 /ci.c
parent34f572f792eab72871f40e2f14747f903a81a34b (diff)
downloadvdr-ce42e42ed7a4ef206196f68f698ba6cce2b5b7de.tar.gz
vdr-ce42e42ed7a4ef206196f68f698ba6cce2b5b7de.tar.bz2
Added handling RI_HOST_CONTROL to the CI protocol
Diffstat (limited to 'ci.c')
-rw-r--r--ci.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/ci.c b/ci.c
index def1530a..41624c15 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 4.14 2017/05/01 09:26:12 kls Exp $
+ * $Id: ci.c 4.15 2017/05/12 09:13:10 kls Exp $
*/
#include "ci.h"
@@ -631,6 +631,7 @@ void cCiResourceManager::Process(int Length, const uint8_t *Data)
uint32_t resources[] = { htonl(RI_RESOURCE_MANAGER),
htonl(RI_APPLICATION_INFORMATION),
htonl(RI_CONDITIONAL_ACCESS_SUPPORT),
+ htonl(RI_HOST_CONTROL),
htonl(RI_DATE_TIME),
htonl(RI_MMI)
};
@@ -1080,6 +1081,39 @@ void cCiConditionalAccessSupport::SendPMT(cCiCaPmt *CaPmt)
}
}
+// --- cCiHostControl --------------------------------------------------------
+
+class cCiHostControl : public cCiSession {
+public:
+ cCiHostControl(uint16_t SessionId, cCiTransportConnection *Tc);
+ virtual void Process(int Length = 0, const uint8_t *Data = NULL);
+ };
+
+cCiHostControl::cCiHostControl(uint16_t SessionId, cCiTransportConnection* Tc)
+:cCiSession(SessionId, RI_HOST_CONTROL, Tc)
+{
+ dbgprotocol("Slot %d: new Host Control (session id %d)\n", Tc->CamSlot()->SlotNumber(), SessionId);
+}
+
+void cCiHostControl::Process(int Length, const uint8_t* Data)
+{
+ if (Data) {
+ int Tag = GetTag(Length, &Data);
+ switch (Tag) {
+ case AOT_TUNE:
+ dbgprotocol("Slot %d: <== Host Control Tune (%d)\n", Tc()->CamSlot()->SlotNumber(), SessionId());
+ break;
+ case AOT_REPLACE:
+ dbgprotocol("Slot %d: <== Host Control Replace (%d)\n", Tc()->CamSlot()->SlotNumber(), SessionId());
+ break;
+ case AOT_CLEAR_REPLACE:
+ dbgprotocol("Slot %d: <== Host Control Clear Replace (%d)\n", Tc()->CamSlot()->SlotNumber(), SessionId());
+ break;
+ default: esyslog("ERROR: CAM %d: Host Control: unknown tag %06X", Tc()->CamSlot()->SlotNumber(), Tag);
+ }
+ }
+}
+
// --- cCiDateTime -----------------------------------------------------------
class cCiDateTime : public cCiSession {
@@ -1578,9 +1612,9 @@ void cCiTransportConnection::OpenSession(int Length, const uint8_t *Data)
case RI_RESOURCE_MANAGER: sessions[i] = new cCiResourceManager(i, this); break;
case RI_APPLICATION_INFORMATION: sessions[i] = new cCiApplicationInformation(i, this); break;
case RI_CONDITIONAL_ACCESS_SUPPORT: sessions[i] = new cCiConditionalAccessSupport(i, this); break;
+ case RI_HOST_CONTROL: sessions[i] = new cCiHostControl(i, this); break;
case RI_DATE_TIME: sessions[i] = new cCiDateTime(i, this); break;
case RI_MMI: sessions[i] = new cCiMMI(i, this); break;
- case RI_HOST_CONTROL: // not implemented
default: esyslog("ERROR: CAM %d: unknown resource identifier: %08X (%d/%d)", camSlot->SlotNumber(), ResourceId, camSlot->SlotIndex(), tcid);
}
if (sessions[i])