add startmmi / some changes
[vuplus_dvbapp] / 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 startMMI();
33 };
34
35 class eDVBCIInterfaces
36 {
37 DECLARE_REF(eDVBCIInterfaces);
38         static eDVBCIInterfaces *instance;
39 private:
40         eSmartPtrList<eDVBCISlot>       m_slots;
41         eDVBCISlot *getSlot(int slotid);
42 public:
43         eDVBCIInterfaces();
44         ~eDVBCIInterfaces();
45
46         static eDVBCIInterfaces *getInstance();
47         
48         int reset(int slot);
49         int startMMI(int slot);
50 };
51
52 #endif