add possibility to read detailed epg from Digital+
[enigma2.git] / lib / dvb / lowlevel / mhw.h
1 #ifndef __MHW_H__
2 #define __MHW_H__
3
4 #include <sys/types.h>
5
6 /* Structures for MHW-EPG tables parsing */
7
8 typedef struct {
9    u_char       network_id_hi;
10    u_char       network_id_lo;
11    u_char       transport_stream_id_hi;
12    u_char       transport_stream_id_lo;
13    u_char       channel_id_hi;
14    u_char       channel_id_lo;
15    u_char       name[16];
16 } mhw_channel_name_t;
17
18 typedef struct {
19    u_char       name[15];
20 } mhw_theme_name_t;
21
22 struct summary_min {
23 #if BYTE_ORDER == BIG_ENDIAN
24    u_char minutes                                :6;
25    u_char                                        :1;
26    u_char summary_available                      :1;
27 #else
28    u_char summary_available                      :1;
29    u_char                                        :1;
30    u_char minutes                                :6;
31 #endif
32 };
33
34 struct day_hours {
35 #if BYTE_ORDER == BIG_ENDIAN
36    u_char day                                    :3;
37    u_char hours                                  :5;
38 #else
39    u_char hours                                  :5;
40    u_char day                                    :3;
41 #endif
42 };
43
44 typedef struct {
45    u_char table_id                               :8;
46 #if BYTE_ORDER == BIG_ENDIAN
47    u_char section_syntax_indicator               :1;
48    u_char dummy                                  :1;
49    u_char                                        :2;
50    u_char section_length_hi                      :4;
51 #else
52    u_char section_length_hi                      :4;
53    u_char                                        :2;
54    u_char dummy                                  :1;
55    u_char section_syntax_indicator               :1;
56 #endif
57    u_char section_length_lo                      :8;
58    u_char channel_id                             :8;
59    union {
60      u_char theme_id                             :8;
61      u_char mhw2_hours                           :8;
62    };
63    union {
64      struct day_hours dh;
65      u_char mhw2_minutes                         :8;
66    };
67    union {
68      struct summary_min ms;
69      u_char mhw2_seconds                         :8;
70    };
71    u_char                                        :8; // mhw2_title begin
72    u_char                                        :8;
73    u_char duration_hi                            :8;
74    u_char duration_lo                            :8;
75    u_char title                                [23];
76    u_char ppv_id_hi                              :8;
77    u_char ppv_id_mh                              :8;
78    u_char ppv_id_ml                              :8;
79    u_char ppv_id_lo                              :8;
80    u_char program_id_hi                          :8;
81    u_char program_id_mh                          :8; // mhw2_title end (33chars max)
82    u_char program_id_ml                          :8;
83    u_char program_id_lo                          :8;
84    u_char mhw2_mjd_hi                            :8;
85    u_char mhw2_mjd_lo                            :8;
86    u_char mhw2_duration_hi                       :8;
87    u_char mhw2_duration_lo                       :8;
88 } mhw_title_t;
89
90 typedef struct mhw_summary {
91    u_char table_id                               :8;
92 #if BYTE_ORDER == BIG_ENDIAN
93    u_char section_syntax_indicator               :1;
94    u_char dummy                                  :1;
95    u_char                                        :2;
96    u_char section_length_hi                      :4;
97 #else
98    u_char section_length_hi                      :4;
99    u_char                                        :2;
100    u_char dummy                                  :1;
101    u_char section_syntax_indicator               :1;
102 #endif
103    u_char section_length_lo                      :8;
104    u_char program_id_hi                          :8;
105    u_char program_id_mh                          :8;
106    u_char program_id_ml                          :8;
107    u_char program_id_lo                          :8;
108    u_char                                        :8;
109    u_char                                        :8;
110    u_char                                        :8;
111    u_char nb_replays                             :8;
112 } mhw_summary_t;
113
114 #endif
115