add some stuff
[enigma2.git] / lib / dvb_ci / dvbci.h
1 #ifndef __dvbci_dvbci_h
2 #define __dvbci_dvbci_h
3
4 #include <lib/base/ebase.h>
5
6 class eDVBCISession;
7 class eDVBCIApplicationManagerSession;
8 class eDVBCICAManagerSession;
9
10 class eDVBCISlot: public iObject, public Object
11 {
12 DECLARE_REF(eDVBCISlot);
13 private:
14         int slotid;
15         int fd;
16         void data(int);
17         eSocketNotifier *notifier;
18
19         int state;
20         enum {stateRemoved, stateInserted};     
21 public:
22         eDVBCISlot(eMainloop *context, int nr);
23         ~eDVBCISlot();
24         
25         int send(const unsigned char *data, size_t len);
26         
27         eDVBCIApplicationManagerSession *application_manager;
28         eDVBCICAManagerSession *ca_manager;
29         
30         int getSlotID();
31         int reset();
32         int initialize();
33         int startMMI();
34         int answerMMI(int answer, char *value);
35 };
36
37 class eDVBCIInterfaces
38 {
39 DECLARE_REF(eDVBCIInterfaces);
40         static eDVBCIInterfaces *instance;
41 private:
42         eSmartPtrList<eDVBCISlot>       m_slots;
43         eDVBCISlot *getSlot(int slotid);
44 public:
45         eDVBCIInterfaces();
46         ~eDVBCIInterfaces();
47
48         static eDVBCIInterfaces *getInstance();
49         
50         int reset(int slot);
51         int initialize(int slot);
52         int startMMI(int slot);
53         int answerMMI(int slot, int answer, char *value);
54 };
55
56 #endif