consistently use iServiceHandler instead of eServiceCenter to use properly wrapped...
[enigma2.git] / lib / dvb_si / mosaic_descriptor.h
1 /*
2  * $Id: mosaic_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $
3  *
4  * (C) 2002-2003 Andreas Oberritter <obi@saftware.de>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  */
21
22 #ifndef __dvb_descriptor_mosaic_descriptor_h__
23 #define __dvb_descriptor_mosaic_descriptor_h__
24
25 #include "descriptor.h"
26
27 class ElementaryCellField
28 {
29         protected:
30                 unsigned reserved                               : 2;
31                 unsigned elementaryCellId                       : 6;
32
33         public:
34                 ElementaryCellField(const uint8_t * const buffer);
35
36                 uint8_t getElementaryCellId(void) const;
37 };
38
39 typedef std::vector<ElementaryCellField *> ElementaryCellFieldVector;
40 typedef ElementaryCellFieldVector::iterator ElementaryCellFieldIterator;
41 typedef ElementaryCellFieldVector::const_iterator ElementaryCellFieldConstIterator;
42
43 class MosaicCell
44 {
45         protected:
46                 unsigned logicalCellId                          : 6;
47                 unsigned reserved                               : 7;
48                 unsigned logicalCellPresentationInfo            : 3;
49                 unsigned elementaryCellFieldLength              : 8;
50                 ElementaryCellFieldVector elementaryCellFields;
51                 unsigned cellLinkageInfo                        : 8;
52                 unsigned bouquetId                              : 16;
53                 unsigned originalNetworkId                      : 16;
54                 unsigned transportStreamId                      : 16;
55                 unsigned serviceId                              : 16;
56                 unsigned eventId                                : 16;
57
58         public:
59                 MosaicCell(const uint8_t * const buffer);
60                 ~MosaicCell(void);
61
62                 uint8_t getLogicalCellId(void) const;
63                 uint8_t getLogicalCellPresentationInfo(void) const;
64                 const ElementaryCellFieldVector *getElementaryCellFields(void) const;
65                 uint8_t getCellLinkageInfo(void) const;
66                 uint16_t getBouquetId(void) const;
67                 uint16_t getOriginalNetworkId(void) const;
68                 uint16_t getTransportStreamId(void) const;
69                 uint16_t getServiceId(void) const;
70                 uint16_t getEventId(void) const;
71 };
72
73 typedef std::vector<MosaicCell *> MosaicCellVector;
74 typedef MosaicCellVector::iterator MosaicCellIterator;
75 typedef MosaicCellVector::const_iterator MosaicCellConstIterator;
76
77 class MosaicDescriptor : public Descriptor
78 {
79         protected:
80                 unsigned mosaicEntryPoint                       : 1;
81                 unsigned numberOfHorizontalElementaryCells      : 3;
82                 unsigned reserved                               : 1;
83                 unsigned numberOfVerticalElementaryCells        : 3;
84                 MosaicCellVector mosaicCells;
85
86         public:
87                 MosaicDescriptor(const uint8_t * const buffer);
88                 ~MosaicDescriptor(void);
89
90                 uint8_t getMosaicEntryPoint(void) const;
91                 uint8_t getNumberOfHorizontalElementaryCells(void) const;
92                 uint8_t getNumberOfVerticalElementaryCells(void) const;
93                 const MosaicCellVector *getMosaicCells(void) const;
94 };
95
96 #endif /* __dvb_descriptor_mosaic_descriptor_h__ */