vdr  2.4.0
ci.h
Go to the documentation of this file.
1 /*
2  * ci.h: Common Interface
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * $Id: ci.h 4.12 2018/03/17 12:17:37 kls Exp $
8  */
9 
10 #ifndef __CI_H
11 #define __CI_H
12 
13 #include <stdint.h>
14 #include <stdio.h>
15 #include "channels.h"
16 #include "ringbuffer.h"
17 #include "thread.h"
18 #include "tools.h"
19 
20 #define MAX_CAM_SLOTS_PER_ADAPTER 16 // maximum possible value is 255 (same value as MAXDEVICES!)
21 #define MAX_CONNECTIONS_PER_CAM_SLOT 8 // maximum possible value is 254
22 #define CAM_READ_TIMEOUT 50 // ms
23 
25 class cCamSlot;
26 
27 // VDR's Common Interface functions implement only the features that are absolutely
28 // necessary to control a CAM. If a plugin wants to implement additional functionality
29 // (i.e. "resources"), it can do so by deriving from cCiResourceHandler, cCiSession
30 // and (if necessary) from cCiApplicationInformation.
31 
32 class cCiSession {
33 private:
34  uint16_t sessionId;
35  uint32_t resourceId;
37 protected:
38  void SetTsPostProcessor(void);
41  void SetResourceId(uint32_t Id);
45  int GetTag(int &Length, const uint8_t **Data);
46  const uint8_t *GetData(const uint8_t *Data, int &Length);
47  void SendData(int Tag, int Length = 0, const uint8_t *Data = NULL);
48  cCiTransportConnection *Tc(void) { return tc; }
49 public:
51  virtual ~cCiSession();
52  uint16_t SessionId(void) { return sessionId; }
53  uint32_t ResourceId(void) { return resourceId; }
54  cCamSlot *CamSlot(void);
55  virtual bool HasUserIO(void) { return false; }
56  virtual void Process(int Length = 0, const uint8_t *Data = NULL);
57  virtual bool TsPostProcess(uint8_t *TsPacket) { return false; }
66  };
67 
69 protected:
70  int state;
71  uint8_t applicationType;
73  uint16_t manufacturerCode;
74  char *menuString;
75 public:
78  virtual void Process(int Length = 0, const uint8_t *Data = NULL);
79  bool EnterMenu(void);
80  const char *GetMenuString(void) { return menuString; }
81  };
82 
84 public:
85  cCiResourceHandler(void);
91  virtual ~cCiResourceHandler();
92  virtual const uint32_t *ResourceIds(void) const = 0;
95  virtual cCiSession *GetNewCiSession(uint32_t ResourceId, uint16_t SessionId, cCiTransportConnection *Tc) = 0;
97  };
98 
99 class cCiResourceHandlers : public cList<cCiResourceHandler> {
100 private:
102 public:
103  cCiResourceHandlers(void);
105  void Register(cCiResourceHandler *ResourceHandler);
110  const uint32_t *Ids(void) { return &resourceIds[0]; }
111  int NumIds(void) { return resourceIds.Size(); }
112  cCiSession *GetNewCiSession(uint32_t ResourceId, uint16_t SessionId, cCiTransportConnection *Tc);
113  };
114 
116 
117 class cCiMMI;
118 
119 class cCiMenu {
120  friend class cCamSlot;
121  friend class cCiMMI;
122 private:
123  enum { MAX_CIMENU_ENTRIES = 64 };
127  char *titleText;
129  char *bottomText;
132  bool AddEntry(char *s);
133  cCiMenu(cCiMMI *MMI, bool Selectable);
134 public:
135  ~cCiMenu();
136  const char *TitleText(void) { return titleText; }
137  const char *SubTitleText(void) { return subTitleText; }
138  const char *BottomText(void) { return bottomText; }
139  const char *Entry(int n) { return n < numEntries ? entries[n] : NULL; }
140  int NumEntries(void) { return numEntries; }
141  bool Selectable(void) { return selectable; }
142  void Select(int Index);
143  void Cancel(void);
144  void Abort(void);
145  bool HasUpdate(void);
146  };
147 
148 class cCiEnquiry {
149  friend class cCamSlot;
150  friend class cCiMMI;
151 private:
154  char *text;
155  bool blind;
157  cCiEnquiry(cCiMMI *MMI);
158 public:
159  ~cCiEnquiry();
160  const char *Text(void) { return text; }
161  bool Blind(void) { return blind; }
162  int ExpectedLength(void) { return expectedLength; }
163  void Reply(const char *s);
164  void Cancel(void);
165  void Abort(void);
166  };
167 
168 class cDevice;
169 
171 
172 class cCiAdapter : public cThread {
173  friend class cCamSlot;
174 private:
176  void AddCamSlot(cCamSlot *CamSlot);
178 protected:
179  cCamSlot *ItCamSlot(int &Iter);
183  virtual void Action(void);
187  virtual int Read(uint8_t *Buffer, int MaxLength) { return 0; }
192  virtual void Write(const uint8_t *Buffer, int Length) {}
194  virtual bool Reset(int Slot) { return false; }
197  virtual eModuleStatus ModuleStatus(int Slot) { return msNone; }
199  virtual bool Assign(cDevice *Device, bool Query = false) { return false; }
208 public:
209  cCiAdapter(void);
210  virtual ~cCiAdapter();
212  };
213 
214 class cTPDU;
216 class cCiSession;
217 class cCiCaProgramData;
218 class cCaPidReceiver;
220 class cMtdHandler;
221 class cMtdMapper;
222 class cMtdCamSlot;
223 class cCiCaPmt;
224 
225 struct cCiCaPmtList {
227  ~cCiCaPmtList();
228  cCiCaPmt *Add(uint8_t CmdId, int Source, int Transponder, int ProgramNumber, const int *CaSystemIds);
229  void Del(cCiCaPmt *CaPmt);
230  };
231 
232 class cCamSlot : public cListObject {
233  friend class cCiAdapter;
236  friend class cMtdCamSlot;
237 private:
247  cCiTransportConnection *tc[MAX_CONNECTIONS_PER_CAM_SLOT + 1]; // connection numbering starts with 1
249  time_t resetTime;
251  bool resendPmt;
252  int source;
257  void NewConnection(void);
258  void DeleteAllConnections(void);
259  void Process(cTPDU *TPDU = NULL);
260  void Write(cTPDU *TPDU);
261  cCiSession *GetSessionByResourceId(uint32_t ResourceId);
262  void MtdActivate(bool On);
264 protected:
265  virtual const int *GetCaSystemIds(void);
266  virtual void SendCaPmt(uint8_t CmdId);
267  virtual bool RepliesToQuery(void);
270  void BuildCaPmts(uint8_t CmdId, cCiCaPmtList &CaPmtList, cMtdMapper *MtdMapper = NULL);
273  void SendCaPmts(cCiCaPmtList &CaPmtList);
275  void MtdEnable(void);
278  int MtdPutData(uchar *Data, int Count);
282 public:
283  bool McdAvailable(void) { return RepliesToQuery(); }
285  bool MtdAvailable(void) { return mtdAvailable; }
287  bool MtdActive(void) { return mtdHandler != NULL; }
289 public:
290  cCamSlot(cCiAdapter *CiAdapter, bool WantsTsData = false, cCamSlot *MasterSlot = NULL);
304  virtual ~cCamSlot();
305  bool IsMasterSlot(void) { return !masterSlot; }
308  cCamSlot *MasterSlot(void) { return masterSlot ? masterSlot : this; }
311  cCamSlot *MtdSpawn(void);
316  void TriggerResendPmt(void) { resendPmt = true; }
318  virtual bool Assign(cDevice *Device, bool Query = false);
331  cDevice *Device(void) { return assignedDevice; }
333  bool Devices(cVector<int> &CardIndexes);
337  bool WantsTsData(void) const { return caPidReceiver != NULL; }
340  int SlotIndex(void) { return slotIndex; }
343  int SlotNumber(void) { return slotNumber; }
349  virtual bool Reset(void);
352  virtual bool CanActivate(void);
355  virtual void StartActivation(void);
365  virtual void CancelActivation(void);
367  virtual bool IsActivating(void);
369  virtual eModuleStatus ModuleStatus(void);
371  virtual const char *GetCamName(void);
374  virtual bool Ready(void);
376  virtual bool HasMMI(void);
378  virtual bool HasUserIO(void);
381  virtual bool EnterMenu(void);
383  virtual cCiMenu *GetMenu(void);
385  virtual cCiEnquiry *GetEnquiry(void);
387  int Priority(void);
390  virtual bool ProvidesCa(const int *CaSystemIds);
397  virtual void AddPid(int ProgramNumber, int Pid, int StreamType);
400  virtual void SetPid(int Pid, bool Active);
404  virtual void AddChannel(const cChannel *Channel);
409  virtual bool CanDecrypt(const cChannel *Channel, cMtdMapper *MtdMapper = NULL);
421  virtual void StartDecrypting(void);
427  virtual void StopDecrypting(void);
432  virtual bool IsDecrypting(void);
434  virtual uchar *Decrypt(uchar *Data, int &Count);
472  virtual bool TsPostProcess(uchar *Data);
478  virtual bool Inject(uchar *Data, int Count);
484  virtual void InjectEit(int Sid);
490  };
491 
492 class cCamSlots : public cList<cCamSlot> {
493 public:
494  int NumReadyMasterSlots(void);
497  bool WaitForAllCamSlotsReady(int Timeout = 0);
503  };
504 
505 extern cCamSlots CamSlots;
506 
507 class cChannelCamRelation;
508 
509 class cChannelCamRelations : public cList<cChannelCamRelation> {
510 private:
515  time_t lastCleanup;
516  void Cleanup(void);
517 public:
518  cChannelCamRelations(void);
519  void Reset(int CamSlotNumber);
520  bool CamChecked(tChannelID ChannelID, int CamSlotNumber);
521  bool CamDecrypt(tChannelID ChannelID, int CamSlotNumber);
522  void SetChecked(tChannelID ChannelID, int CamSlotNumber);
523  void SetDecrypt(tChannelID ChannelID, int CamSlotNumber);
524  void ClrChecked(tChannelID ChannelID, int CamSlotNumber);
525  void ClrDecrypt(tChannelID ChannelID, int CamSlotNumber);
526  void Load(const char *FileName);
527  void Save(void);
528  };
529 
531 
532 bool CamResponsesLoad(const char *FileName, bool AllowComments = false, bool MustExist = false);
533 
534 #endif //__CI_H
uint16_t applicationManufacturer
Definition: ci.h:72
Definition: ci.h:170
unsigned char uchar
Definition: tools.h:31
cMutex mutex
Definition: ci.h:238
virtual void Action(void)
Handles the attached CAM slots in a separate thread.
Definition: ci.c:2114
cCamSlot * MtdSpawn(void)
If this CAM slot can do MTD ("Multi Transponder Decryption"), a call to this function returns a cMtdC...
Definition: ci.c:2173
bool Devices(cVector< int > &CardIndexes)
Adds the card indexes of any devices that currently use this CAM to the given CardIndexes.
Definition: ci.c:2222
Definition: ci.h:492
uint16_t sessionId
Definition: ci.h:34
cVector< cCiCaPmt * > caPmts
Definition: ci.h:226
int MasterSlotNumber(void)
Returns the number of this CAM&#39;s master slot within the whole system.
Definition: ci.h:346
virtual bool ProvidesCa(const int *CaSystemIds)
Returns true if the CAM in this slot provides one of the given CaSystemIds.
Definition: ci.c:2585
cCondVar processed
Definition: ci.h:239
cCamSlots CamSlots
Definition: ci.c:2755
virtual ~cCiAdapter()
The derived class must call Cancel(3) in its destructor.
Definition: ci.c:2082
const uint32_t * Ids(void)
Definition: ci.h:110
virtual void StartActivation(void)
Puts the CAM in this slot into a mode where an inserted smart card can be activated.
Definition: ci.c:2358
cCamSlot * ItCamSlot(int &Iter)
Iterates over all added CAM slots of this adapter.
Definition: ci.c:2103
cCiSession(uint16_t SessionId, uint32_t ResourceId, cCiTransportConnection *Tc)
Definition: ci.c:694
void TriggerResendPmt(void)
Tells this CAM slot to resend the list of CA_PMTs to the CAM.
Definition: ci.h:316
virtual void AddPid(int ProgramNumber, int Pid, int StreamType)
Adds the given PID information to the list of PIDs.
Definition: ci.c:2600
bool HasUpdate(void)
Definition: ci.c:1628
virtual void Write(const uint8_t *Buffer, int Length)
Writes Length bytes of the given Buffer.
Definition: ci.h:192
int source
Definition: ci.h:252
cCiApplicationInformation(uint16_t SessionId, cCiTransportConnection *Tc)
Definition: ci.c:824
virtual void InjectEit(int Sid)
Injects a generated EIT with a "present event" for the given Sid into the TS data stream sent to the ...
Definition: ci.c:2747
const char * GetMenuString(void)
Definition: ci.h:80
virtual void StartDecrypting(void)
Sends all CA_PMT entries to the CAM that have been modified since the last call to this function...
Definition: ci.c:2697
#define MAX_CONNECTIONS_PER_CAM_SLOT
Definition: ci.h:21
cChannelCamRelations ChannelCamRelations
Definition: ci.c:2864
void MtdActivate(bool On)
Activates (On == true) or deactivates (On == false) MTD.
Definition: ci.c:2548
#define MAX_CAM_SLOTS_PER_ADAPTER
Definition: ci.h:20
virtual bool TsPostProcess(uchar *Data)
If there is a cCiSession that needs to do additional processing on TS packets (after the CAM has done...
Definition: ci.c:2737
bool MtdAvailable(void)
Returns true if this CAM supports MTD ("Multi Transponder Decryption").
Definition: ci.h:285
Definition: ci.h:148
int slotNumber
Definition: ci.h:246
int NumReadyMasterSlots(void)
Returns the number of master CAM slots in the system that are ready to decrypt.
Definition: ci.c:2757
char * bottomText
Definition: ci.h:129
void Select(int Index)
Definition: ci.c:1634
cCiResourceHandlers CiResourceHandlers
Definition: ci.c:1738
cCamSlot * CamSlot(void)
Definition: ci.c:758
Definition: ci.h:170
void MtdEnable(void)
Enables MTD support for this CAM.
Definition: ci.c:2543
virtual bool CanActivate(void)
Returns true if there is a CAM in this slot that can be put into activation mode. ...
Definition: ci.c:2353
Definition: tools.h:594
virtual bool Inject(uchar *Data, int Count)
Sends all Count bytes of the given Data to the CAM, and returns true if this was possible.
Definition: ci.c:2742
int GetTag(int &Length, const uint8_t **Data)
Definition: ci.c:715
bool resendPmt
Definition: ci.h:251
cCiMMI * mmi
Definition: ci.h:152
uint32_t resourceId
Definition: ci.h:35
time_t resetTime
Definition: ci.h:249
bool IsMasterSlot(void)
Returns true if this CAM slot itself is a master slot (which means that it doesn&#39;t have a pointer to ...
Definition: ci.h:305
bool Selectable(void)
Definition: ci.h:141
cCiAdapter(void)
Definition: ci.c:2075
Definition: ci.c:1369
int SlotIndex(void)
Returns the index of this CAM slot within its CI adapter.
Definition: ci.h:340
cCiSession * GetNewCiSession(uint32_t ResourceId, uint16_t SessionId, cCiTransportConnection *Tc)
Definition: ci.c:1758
int slotIndex
Definition: ci.h:245
void SetTsPostProcessor(void)
If this cCiSession implements the TsPostProcess() function, it shall call SetTsPostProcessor() to reg...
Definition: ci.c:710
virtual bool HasUserIO(void)
Definition: ci.h:55
void NewConnection(void)
Definition: ci.c:2232
virtual eModuleStatus ModuleStatus(void)
Returns the status of the CAM in this slot.
Definition: ci.c:2391
int numEntries
Definition: ci.h:131
virtual void AddChannel(const cChannel *Channel)
Adds all PIDs of the given Channel to the current list of PIDs.
Definition: ci.c:2641
uint32_t ResourceId(void)
Definition: ci.h:53
void Write(cTPDU *TPDU)
Definition: ci.c:2326
void Cleanup(void)
Definition: ci.c:2871
virtual void SendCaPmt(uint8_t CmdId)
Definition: ci.c:2535
bool McdAvailable(void)
Returns true if this CAM supports MCD ("Multi Channel Decyption").
Definition: ci.h:283
virtual bool Reset(int Slot)
Resets the CAM in the given Slot.
Definition: ci.h:194
cCiTransportConnection * tc[MAX_CONNECTIONS_PER_CAM_SLOT+1]
Definition: ci.h:247
uint8_t applicationType
Definition: ci.h:71
cCaActivationReceiver * caActivationReceiver
Definition: ci.h:244
virtual cCiSession * GetNewCiSession(uint32_t ResourceId, uint16_t SessionId, cCiTransportConnection *Tc)=0
Returns a new cCiSession, according to the given ResourceId.
bool blind
Definition: ci.h:155
char * titleText
Definition: ci.h:127
cCamSlot * masterSlot
Definition: ci.h:241
cCiTransportConnection * tc
Definition: ci.h:36
cCiSession * GetSessionByResourceId(uint32_t ResourceId)
Definition: ci.c:2320
~cCiMenu()
Definition: ci.c:1607
virtual ~cCamSlot()
Definition: ci.c:2163
char * subTitleText
Definition: ci.h:128
cCiEnquiry(cCiMMI *MMI)
Definition: ci.c:1655
void Process(cTPDU *TPDU=NULL)
Definition: ci.c:2254
int MtdPutData(uchar *Data, int Count)
Sends at most Count bytes of the given Data to the individual MTD CAM slots that are using this CAM...
Definition: ci.c:2565
virtual ~cCiResourceHandler()
Definition: ci.c:1697
const char * Text(void)
Definition: ci.h:160
virtual bool HasUserIO(void)
Returns true if there is a pending user interaction, which shall be retrieved via GetMenu() or GetEnq...
Definition: ci.c:2422
uint16_t SessionId(void)
Definition: ci.h:52
void SetDecrypt(tChannelID ChannelID, int CamSlotNumber)
Definition: ci.c:2936
void SendData(int Tag, int Length=0, const uint8_t *Data=NULL)
Definition: ci.c:736
virtual cCiMenu * GetMenu(void)
Gets a pending menu, or NULL if there is no menu.
Definition: ci.c:2435
int Size(void) const
Definition: tools.h:717
Definition: ci.h:32
int expectedLength
Definition: ci.h:156
void Cancel(void)
Definition: ci.c:1641
cList< cCiCaProgramData > caProgramList
Definition: ci.h:254
bool EnterMenu(void)
Definition: ci.c:870
Definition: ci.h:172
bool WantsTsData(void) const
Returns true if this CAM slot wants to receive the TS data through its Decrypt() function.
Definition: ci.h:337
cVector< uint32_t > resourceIds
Definition: ci.h:101
bool CamDecrypt(tChannelID ChannelID, int CamSlotNumber)
Definition: ci.c:2921
virtual int Read(uint8_t *Buffer, int MaxLength)
Reads one chunk of data into the given Buffer, up to MaxLength bytes.
Definition: ci.h:187
void Load(const char *FileName)
Definition: ci.c:2960
uint16_t manufacturerCode
Definition: ci.h:73
eModuleStatus lastModuleStatus
Definition: ci.h:248
Definition: ci.h:232
void AddCamSlot(cCamSlot *CamSlot)
Adds the given CamSlot to this CI adapter.
Definition: ci.c:2089
void BuildCaPmts(uint8_t CmdId, cCiCaPmtList &CaPmtList, cMtdMapper *MtdMapper=NULL)
Generates all CA_PMTs with the given CmdId and stores them in the given CaPmtList.
Definition: ci.c:2487
cCiAdapter * ciAdapter
Definition: ci.h:240
cCiTransportConnection * Tc(void)
Definition: ci.h:48
Definition: thread.h:67
Definition: ci.c:471
virtual const int * GetCaSystemIds(void)
Definition: ci.c:2570
cCiResourceHandlers(void)
Creates the default list of resourceIds.
Definition: ci.c:1740
cCamSlot * MasterSlot(void)
Returns this CAM slot&#39;s master slot, or a pointer to itself if it is a master slot.
Definition: ci.h:308
bool CamResponsesLoad(const char *FileName, bool AllowComments=false, bool MustExist=false)
Definition: ci.c:447
virtual bool Reset(void)
Resets the CAM in this slot.
Definition: ci.c:2335
void SendCaPmts(cCiCaPmtList &CaPmtList)
Sends the given list of CA_PMTs to the CAM.
Definition: ci.c:2524
virtual bool IsDecrypting(void)
Returns true if the CAM in this slot is currently used for decrypting.
Definition: ci.c:2712
int transponder
Definition: ci.h:253
void ClrDecrypt(tChannelID ChannelID, int CamSlotNumber)
Definition: ci.c:2952
void Del(cCiCaPmt *CaPmt)
Definition: ci.c:2474
virtual void SetPid(int Pid, bool Active)
Sets the given Pid (which has previously been added through a call to AddPid()) to Active...
Definition: ci.c:2618
cCamSlot * camSlots[MAX_CAM_SLOTS_PER_ADAPTER]
Definition: ci.h:175
int ExpectedLength(void)
Definition: ci.h:162
virtual cCiEnquiry * GetEnquiry(void)
Gets a pending enquiry, or NULL if there is no enquiry.
Definition: ci.c:2448
cChannelCamRelation * AddEntry(tChannelID ChannelID)
Definition: ci.c:2896
cString fileName
Definition: ci.h:512
cMutex mutex
Definition: ci.h:511
bool WaitForAllCamSlotsReady(int Timeout=0)
Waits until all CAM slots have become ready, or the given Timeout (seconds) has expired.
Definition: ci.c:2767
cMtdHandler * mtdHandler
Definition: ci.h:256
~cCiEnquiry()
Definition: ci.c:1664
virtual void Process(int Length=0, const uint8_t *Data=NULL)
Definition: ci.c:763
void Reply(const char *s)
Definition: ci.c:1672
int NumIds(void)
Definition: ci.h:111
Definition: ci.h:119
virtual eModuleStatus ModuleStatus(int Slot)
Returns the status of the CAM in the given Slot.
Definition: ci.h:197
virtual bool HasMMI(void)
Returns &#39;true&#39; if the CAM in this slot has an active MMI.
Definition: ci.c:2417
cDevice * assignedDevice
Definition: ci.h:242
void Cancel(void)
Definition: ci.c:1679
void SetChecked(tChannelID ChannelID, int CamSlotNumber)
Definition: ci.c:2928
bool MtdActive(void)
Returns true if MTD is currently active.
Definition: ci.h:287
virtual const char * GetCamName(void)
Returns the name of the CAM in this slot, or NULL if there is no ready CAM in this slot...
Definition: ci.c:2405
char * entries[MAX_CIMENU_ENTRIES]
Definition: ci.h:130
const char * Entry(int n)
Definition: ci.h:139
cCiResourceHandler(void)
Creates a new resource handler, through which the available resources can be provides.
Definition: ci.c:1693
virtual bool Ready(void)
Returns &#39;true&#39; if the CAM in this slot is ready to decrypt.
Definition: ci.c:2411
cTimeMs moduleCheckTimer
Definition: ci.h:250
cCaPidReceiver * caPidReceiver
Definition: ci.h:243
int NumEntries(void)
Definition: ci.h:140
time_t lastCleanup
Definition: ci.h:515
cMutex * mutex
Definition: ci.h:125
virtual void CancelActivation(void)
Cancels a previously started activation (if any).
Definition: ci.c:2373
virtual uchar * Decrypt(uchar *Data, int &Count)
If this is a CAM slot that can be freely assigned to any device, but will not be directly inserted in...
Definition: ci.c:2730
virtual bool CanDecrypt(const cChannel *Channel, cMtdMapper *MtdMapper=NULL)
Returns true if there is a CAM in this slot that is able to decrypt the given Channel (or at least cl...
Definition: ci.c:2661
Definition: thread.h:79
Definition: ci.c:900
bool mtdAvailable
Definition: ci.h:255
int Priority(void)
Returns the priority of the device this slot is currently assigned to, or IDLEPRIORITY if it is not a...
Definition: ci.c:2577
bool CamChecked(tChannelID ChannelID, int CamSlotNumber)
Definition: ci.c:2914
virtual void StopDecrypting(void)
Clears the list of CA_PMT entries and tells the CAM to stop decrypting.
Definition: ci.c:2702
virtual bool TsPostProcess(uint8_t *TsPacket)
If this cCiSession needs to do additional processing on TS packets (after the CAM has done the decryp...
Definition: ci.h:57
virtual ~cCiSession()
Definition: ci.c:701
void ClrChecked(tChannelID ChannelID, int CamSlotNumber)
Definition: ci.c:2944
const char * SubTitleText(void)
Definition: ci.h:137
const uint8_t * GetData(const uint8_t *Data, int &Length)
Definition: ci.c:730
Definition: tools.h:369
void Abort(void)
Definition: ci.c:1684
void Reset(int CamSlotNumber)
Definition: ci.c:2905
virtual bool EnterMenu(void)
Requests the CAM in this slot to start its menu.
Definition: ci.c:2428
eModuleStatus
Definition: ci.h:170
void Save(void)
Definition: ci.c:2994
cCiMenu(cCiMMI *MMI, bool Selectable)
Definition: ci.c:1598
void Register(cCiResourceHandler *ResourceHandler)
Adds the given ResourceHandler to the list of resource handlers and appends its ResourceIds to the gl...
Definition: ci.c:1745
cCamSlot(cCiAdapter *CiAdapter, bool WantsTsData=false, cCamSlot *MasterSlot=NULL)
Creates a new CAM slot for the given CiAdapter.
Definition: ci.c:2138
cCiMMI * mmi
Definition: ci.h:124
const char * BottomText(void)
Definition: ci.h:138
virtual bool Assign(cDevice *Device, bool Query=false)
Assigns this adapter to the given Device, if this is possible.
Definition: ci.h:199
void Abort(void)
Definition: ci.c:1646
cChannelCamRelation * GetEntry(tChannelID ChannelID)
Definition: ci.c:2885
virtual bool Assign(cDevice *Device, bool Query=false)
Assigns this CAM slot to the given Device, if this is possible.
Definition: ci.c:2181
Definition: ci.h:170
virtual bool IsActivating(void)
Returns true if this CAM slot is currently activating a smart card.
Definition: ci.c:2384
cMtdMapper * MtdMapper(void)
Definition: mtd.h:168
char * text
Definition: ci.h:154
~cCiCaPmtList()
Definition: ci.c:2461
cCiCaPmt * Add(uint8_t CmdId, int Source, int Transponder, int ProgramNumber, const int *CaSystemIds)
Definition: ci.c:2467
cMutex * mutex
Definition: ci.h:153
cChannelCamRelations(void)
Definition: ci.c:2866
void DeleteAllConnections(void)
Definition: ci.c:2245
void SetResourceId(uint32_t Id)
If this is a class that has been derived from an existing cCiSession class, but implements a differen...
Definition: ci.c:705
virtual void Process(int Length=0, const uint8_t *Data=NULL)
Definition: ci.c:837
int SlotNumber(void)
Returns the number of this CAM slot within the whole system.
Definition: ci.h:343
Definition: tools.h:176
virtual ~cCiApplicationInformation()
Definition: ci.c:832
bool selectable
Definition: ci.h:126
const char * TitleText(void)
Definition: ci.h:136
bool AddEntry(char *s)
Definition: ci.c:1619
virtual const uint32_t * ResourceIds(void) const =0
Returns a pointer to an array of resource identifiers, where the last value is zero.
bool Blind(void)
Definition: ci.h:161
Definition: ci.h:170
cDevice * Device(void)
Returns the device this CAM slot is currently assigned to.
Definition: ci.h:331
virtual bool RepliesToQuery(void)
Returns true if the CAM in this slot replies to queries and thus supports MCD ("Multi Channel Decrypt...
Definition: ci.c:2480