add stop service
[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/idemux.h>
6 #include <dvbsi++/program_map_section.h>
7 #include <dvbsi++/service_description_section.h>
8 #include <dvbsi++/network_information_section.h>
9 #include <dvbsi++/bouquet_association_section.h>
10 #include <dvbsi++/program_association_section.h>
11 #include <dvbsi++/event_information_section.h>
12
13 struct eDVBPMTSpec
14 {
15         eDVBTableSpec m_spec;
16 public:
17         eDVBPMTSpec(int pid, int sid)
18         {
19                 m_spec.pid     = pid;
20                 m_spec.tid     = ProgramMapSection::TID;
21                 m_spec.tidext  = sid;
22                 m_spec.timeout = 20000; // ProgramMapSection::TIMEOUT;
23                 m_spec.flags   = eDVBTableSpec::tfAnyVersion | 
24                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDExt | 
25                         eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout;
26         }
27         operator eDVBTableSpec &()
28         {
29                 return m_spec;
30         }
31 };
32
33 struct eDVBSDTSpec
34 {
35         eDVBTableSpec m_spec;
36 public:
37         eDVBSDTSpec()
38         {
39                 m_spec.pid     = ServiceDescriptionSection::PID;
40                 m_spec.tid     = ServiceDescriptionSection::TID;
41                 m_spec.timeout = 20000; // ServiceDescriptionSection::TIMEOUT;
42                 m_spec.flags   = eDVBTableSpec::tfAnyVersion |
43                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
44                         eDVBTableSpec::tfHaveTimeout;
45         }
46         operator eDVBTableSpec &()
47         {
48                 return m_spec;
49         }
50 };
51
52 struct eDVBNITSpec
53 {
54         eDVBTableSpec m_spec;
55 public:
56         eDVBNITSpec()
57         {
58                 m_spec.pid     = NetworkInformationSection::PID;
59                 m_spec.tid     = NetworkInformationSection::TID;
60                 m_spec.timeout = NetworkInformationSection::TIMEOUT;
61                 m_spec.flags   = eDVBTableSpec::tfAnyVersion |
62                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
63                         eDVBTableSpec::tfHaveTimeout;
64         }
65         operator eDVBTableSpec &()
66         {
67                 return m_spec;
68         }
69 };
70
71 struct eDVBBATSpec
72 {
73         eDVBTableSpec m_spec;
74 public:
75         eDVBBATSpec()
76         {
77                 m_spec.pid     = BouquetAssociationSection::PID;
78                 m_spec.tid     = BouquetAssociationSection::TID;
79                 m_spec.timeout = BouquetAssociationSection::TIMEOUT;
80                 m_spec.flags   = eDVBTableSpec::tfAnyVersion |
81                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
82                         eDVBTableSpec::tfHaveTimeout;
83         }
84         operator eDVBTableSpec &()
85         {
86                 return m_spec;
87         }
88 };
89
90 struct eDVBPATSpec
91 {
92         eDVBTableSpec m_spec;
93 public:
94         eDVBPATSpec()
95         {
96                 m_spec.pid     = ProgramAssociationSection::PID;
97                 m_spec.tid     = ProgramAssociationSection::TID;
98                 m_spec.timeout = 20000; // ProgramAssociationSection::TIMEOUT;
99                 m_spec.flags   = eDVBTableSpec::tfAnyVersion |
100                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC |
101                         eDVBTableSpec::tfHaveTimeout;
102         }
103         operator eDVBTableSpec &()
104         {
105                 return m_spec;
106         }
107 };
108
109 class eDVBEITSpec
110 {
111         eDVBTableSpec m_spec;
112 public:
113                 /* this is for now&next on actual transponder. */
114         eDVBEITSpec(int sid)
115         {
116                 m_spec.pid     = EventInformationSection::PID;
117                 m_spec.tid     = EventInformationSection::TID;
118                 m_spec.tidext  = sid;
119                 m_spec.timeout = EventInformationSection::TIMEOUT;
120                 m_spec.flags   = eDVBTableSpec::tfAnyVersion | 
121                         eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDExt |
122                         eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout;
123         }
124         operator eDVBTableSpec &()
125         {
126                 return m_spec;
127         }
128 };
129
130 #endif