add datetime mgr
[enigma2.git] / lib / dvb_si / cell_list_descriptor.h
1 /*
2  * $Id: cell_list_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_cell_list_descriptor_h__
23 #define __dvb_descriptor_cell_list_descriptor_h__
24
25 #include "descriptor.h"
26
27 class Subcell
28 {
29         protected:
30                 unsigned cellIdExtension                        : 8;
31                 unsigned subcellLatitude                        : 16;
32                 unsigned subcellLongitude                       : 16;
33                 unsigned subcellExtendOfLatitude                : 12;
34                 unsigned subcellExtendOfLongitude               : 12;
35
36         public:
37                 Subcell(const uint8_t * const buffer);
38
39                 uint8_t getCellIdExtension(void) const;
40                 uint16_t getSubcellLatitude(void) const;
41                 uint16_t getSubcellLongtitude(void) const;
42                 uint16_t getSubcellExtendOfLatitude(void) const;
43                 uint16_t getSubcellExtendOfLongtitude(void) const;
44 };
45
46 typedef std::vector<Subcell *> SubcellVector;
47 typedef SubcellVector::iterator SubcellIterator;
48 typedef SubcellVector::const_iterator SubcellConstIterator;
49
50 class Cell
51 {
52         protected:
53                 unsigned cellId                                 : 16;
54                 unsigned cellLatitude                           : 16;
55                 unsigned cellLongtitude                         : 16;
56                 unsigned cellExtendOfLatitude                   : 12;
57                 unsigned cellExtendOfLongtitude                 : 12;
58                 unsigned subcellInfoLoopLength                  : 8;
59                 SubcellVector subcells;
60
61         public:
62                 Cell(const uint8_t * const buffer);
63                 ~Cell(void);
64
65                 uint16_t getCellId(void) const;
66                 uint16_t getCellLatitude(void) const;
67                 uint16_t getCellLongtitude(void) const;
68                 uint16_t getCellExtendOfLatitude(void) const;
69                 uint16_t getCellExtendOfLongtitude(void) const;
70                 const SubcellVector *getSubcells(void) const;
71 };
72
73 typedef std::vector<Cell *> CellVector;
74 typedef CellVector::iterator CellIterator;
75 typedef CellVector::const_iterator CellConstIterator;
76
77 class CellListDescriptor : public Descriptor
78 {
79         protected:
80                 CellVector cells;
81
82         public:
83                 CellListDescriptor(const uint8_t * const buffer);
84                 ~CellListDescriptor(void);
85
86                 const CellVector *getCells(void) const;
87 };
88
89 #endif /* __dvb_descriptor_cell_list_descriptor_h__ */