summaryrefslogtreecommitdiff
path: root/ci.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-01-10 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-01-10 18:00:00 +0100
commit3e1d34f392792bbcf1bda4884c58ca9cec445d1d (patch)
treee2c9910b5a7d429784eeda4404ea7429e757a8f3 /ci.h
parent48fd2b04e9010bb67e19f33e8c7506a976b70e90 (diff)
downloadvdr-patch-lnbsharing-3e1d34f392792bbcf1bda4884c58ca9cec445d1d.tar.gz
vdr-patch-lnbsharing-3e1d34f392792bbcf1bda4884c58ca9cec445d1d.tar.bz2
Version 1.1.21vdr-1.1.21
- Fixed the 'channels.conf' entries for "Studio Universal" and "Disney Channel". - Fixed handling channels in the "Channels" menu in case there are ':@nnn' group separators without names (thanks to Guy Roussin for reporting this one). - The SVDRP command CHAN now also accepts channel IDs. - Increased the timeout until an index file is considerd no longer to be written (sometimes in time shift with heavy system load the index file was closed too early by the replay thread). - Implemented "Link Layer" based CAM support, which hopefully will solve the problems with CAMs we had in the past. To use this you need the driver version 2002-01-08 or higher (with the new firmware supporting the "Link Layer" protocol). - Added an EPG bugfix that moves the Subtitle data to the Extended Description in case the latter is empty and the Subtitle exceeds some useful length. - Since several channels put very long strings into the Subtitle part of their EPG data, that string is now limited in length when used in a recording's file name.
Diffstat (limited to 'ci.h')
-rw-r--r--ci.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/ci.h b/ci.h
new file mode 100644
index 0000000..c9cd6f5
--- /dev/null
+++ b/ci.h
@@ -0,0 +1,105 @@
+/*
+ * ci.h: Common Interface
+ *
+ * See the main source file 'vdr.c' for copyright information and
+ * how to reach the author.
+ *
+ * $Id: ci.h 1.1 2003/01/06 12:31:09 kls Exp $
+ */
+
+#ifndef __CI_H
+#define __CI_H
+
+#include <stdint.h>
+#include <stdio.h>
+#include "thread.h"
+
+class cCiMMI;
+
+class cCiMenu {
+ friend class cCiMMI;
+private:
+ enum { MAX_CIMENU_ENTRIES = 64 }; ///< XXX is there a specified maximum?
+ cCiMMI *mmi;
+ bool selectable;
+ char *titleText;
+ char *subTitleText;
+ char *bottomText;
+ char *entries[MAX_CIMENU_ENTRIES];
+ int numEntries;
+ bool AddEntry(char *s);
+ cCiMenu(cCiMMI *MMI, bool Selectable);
+public:
+ ~cCiMenu();
+ const char *TitleText(void) { return titleText; }
+ const char *SubTitleText(void) { return subTitleText; }
+ const char *BottomText(void) { return bottomText; }
+ const char *Entry(int n) { return n < numEntries ? entries[n] : NULL; }
+ int NumEntries(void) { return numEntries; }
+ bool Selectable(void) { return selectable; }
+ bool Select(int Index);
+ bool Cancel(void);
+ };
+
+class cCiEnquiry {
+ friend class cCiMMI;
+private:
+ cCiMMI *mmi;
+ char *text;
+ bool blind;
+ int expectedLength;
+ cCiEnquiry(cCiMMI *MMI);
+public:
+ ~cCiEnquiry();
+ const char *Text(void) { return text; }
+ bool Blind(void) { return blind; }
+ int ExpectedLength(void) { return expectedLength; }
+ bool Reply(const char *s);
+ bool Cancel(void);
+ };
+
+class cCiCaPmt {
+ friend class cCiConditionalAccessSupport;
+private:
+ int length;
+ int esInfoLengthPos;
+ uint8_t capmt[2048]; ///< XXX is there a specified maximum?
+public:
+ cCiCaPmt(int ProgramNumber);
+ void AddPid(int Pid);
+ void AddCaDescriptor(int Length, uint8_t *Data);
+ };
+
+#define MAX_CI_SESSION 16 //XXX
+
+class cCiSession;
+class cCiTransportLayer;
+class cCiTransportConnection;
+
+class cCiHandler {
+private:
+ cMutex mutex;
+ int numSlots;
+ cCiSession *sessions[MAX_CI_SESSION];
+ cCiTransportLayer *tpl;
+ cCiTransportConnection *tc;
+ int ResourceIdToInt(const uint8_t *Data);
+ bool Send(uint8_t Tag, int SessionId, int ResourceId = 0, int Status = -1);
+ cCiSession *GetSessionBySessionId(int SessionId);
+ cCiSession *GetSessionByResourceId(int ResourceId);
+ cCiSession *CreateSession(int ResourceId);
+ bool OpenSession(int Length, const uint8_t *Data);
+ bool CloseSession(int SessionId);
+ cCiHandler(int Fd, int NumSlots);
+public:
+ ~cCiHandler();
+ static cCiHandler *CreateCiHandler(const char *FileName);
+ bool Process(void);
+ bool EnterMenu(void);
+ cCiMenu *GetMenu(void);
+ cCiEnquiry *GetEnquiry(void);
+ bool SetCaPmt(cCiCaPmt &CaPmt);
+ bool Reset(void);
+ };
+
+#endif //__CI_H