3c6908c220c98c77eac987a3ffd17b95be7bee23
[enigma2.git] / lib / dvb / specs.h
1 #ifndef __lib_dvb_specs_h
2 #define __lib_dvb_specs_h
3
4 #include <lib/dvb/idvb.h>
5 #include <lib/dvb/isection.h>
6 #include <lib/dvb_si/pmt.h>
7 #include <lib/dvb_si/sdt.h>
8 #include <lib/dvb_si/nit.h>
9 #include <lib/dvb_si/bat.h>
10 #include <lib/dvb_si/pat.h>
11
12 struct eDVBPMTSpec
13 {
14         eDVBTableSpec m_spec;
15 public:
16         eDVBPMTSpec(int pid, int sid)
17         {
18                 m_spec.pid     = pid;
19                 m_spec.tid     = ProgramMapTable::TID;
20                 m_spec.tidext  = sid;
21                 m_spec.timeout = ProgramMapTable::TIMEOUT;
22                 m_spec.flags   = eDVBTableSpec::tfAnyVersion | 
23                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDExt | 
24                         eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout;
25         }
26         operator eDVBTableSpec &()
27         {
28                 return m_spec;
29         }
30 };
31
32 struct eDVBSDTSpec
33 {
34         eDVBTableSpec m_spec;
35 public:
36         eDVBSDTSpec()
37         {
38                 m_spec.pid     = ServiceDescriptionTable::PID;
39                 m_spec.tid     = ServiceDescriptionTable::TID;
40                 m_spec.timeout = ServiceDescriptionTable::TIMEOUT;
41                 m_spec.flags   = eDVBTableSpec::tfAnyVersion |
42                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
43                         eDVBTableSpec::tfHaveTimeout;
44         }
45         operator eDVBTableSpec &()
46         {
47                 return m_spec;
48         }
49 };
50
51 struct eDVBNITSpec
52 {
53         eDVBTableSpec m_spec;
54 public:
55         eDVBNITSpec()
56         {
57                 m_spec.pid     = NetworkInformationTable::PID;
58                 m_spec.tid     = NetworkInformationTable::TID;
59                 m_spec.timeout = NetworkInformationTable::TIMEOUT;
60                 m_spec.flags   = eDVBTableSpec::tfAnyVersion |
61                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
62                         eDVBTableSpec::tfHaveTimeout;
63         }
64         operator eDVBTableSpec &()
65         {
66                 return m_spec;
67         }
68 };
69
70 struct eDVBBATSpec
71 {
72         eDVBTableSpec m_spec;
73 public:
74         eDVBBATSpec()
75         {
76                 m_spec.pid     = BouquetAssociationTable::PID;
77                 m_spec.tid     = BouquetAssociationTable::TID;
78                 m_spec.timeout = BouquetAssociationTable::TIMEOUT;
79                 m_spec.flags   = eDVBTableSpec::tfAnyVersion |
80                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
81                         eDVBTableSpec::tfHaveTimeout;
82         }
83         operator eDVBTableSpec &()
84         {
85                 return m_spec;
86         }
87 };
88
89 struct eDVBPATSpec
90 {
91         eDVBTableSpec m_spec;
92 public:
93         eDVBPATSpec()
94         {
95                 m_spec.pid     = ProgramAssociationTable::PID;
96                 m_spec.tid     = ProgramAssociationTable::TID;
97                 m_spec.timeout = ProgramAssociationTable::TIMEOUT;
98                 m_spec.flags   = eDVBTableSpec::tfAnyVersion |
99                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
100                         eDVBTableSpec::tfHaveTimeout;
101         }
102         operator eDVBTableSpec &()
103         {
104                 return m_spec;
105         }
106 };
107
108 #endif