MythTV  master
dsmccobjcarousel.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) David C.J. Matthews 2005, 2006
3  * Derived from libdsmcc by Richard Palmer
4  */
5 #ifndef DSMCC_OBJCAROUSEL_H
6 #define DSMCC_OBJCAROUSEL_H
7 
8 #include <QLinkedList>
9 
10 #include <vector>
11 using namespace std;
12 
13 class DsmccDii;
14 class Dsmcc;
15 class DsmccDb;
16 class DsmccModuleInfo;
17 
18 #include "dsmcccache.h"
19 #include "dsmccbiop.h" // For ModuleDescriptorData
20 
26 {
27  public:
29  unsigned short streamTag);
31 
32  unsigned char *AddModuleData(DsmccDb *ddb, const unsigned char *Data);
33 
34  unsigned long CarouselId(void) const { return m_carousel_id; }
35  unsigned short ModuleId(void) const { return m_module_id; }
36  unsigned short StreamId(void) const { return m_stream_id; }
37  unsigned char Version(void) const { return m_version; }
38  unsigned long ModuleSize(void) const { return m_moduleSize; }
39 
41  unsigned long DataSize(void) const
42  {
43  return (m_descriptorData.m_isCompressed) ?
44  m_descriptorData.m_originalSize : m_moduleSize;
45  }
46 
47 
48  private:
49  unsigned long m_carousel_id;
50  unsigned short m_module_id;
51  unsigned short m_stream_id;
52 
53  unsigned char m_version;
54  unsigned long m_moduleSize;
55  unsigned long m_receivedData {0};
56 
58  vector<QByteArray*> m_blocks;
60  bool m_completed {false};
62 };
63 
65 {
66  public:
67  explicit ObjCarousel(Dsmcc*dsmcc) : m_filecache(dsmcc) {}
68  ~ObjCarousel();
69  void AddModuleInfo(DsmccDii *dii, Dsmcc *status, unsigned short streamTag);
70  void AddModuleData(DsmccDb *ddb, const unsigned char *data);
71 
73  QLinkedList<DSMCCCacheModuleData*> m_Cache;
75  vector<unsigned short> m_Tags;
76  unsigned long m_id {0};
77 };
78 
79 #endif
80 
vector< QByteArray * > m_blocks
Block table. As blocks are received they are added to this table.
unsigned long m_carousel_id
unsigned long m_moduleSize
Total size.
QLinkedList< DSMCCCacheModuleData * > m_Cache
Definition: dsmcc.h:75
unsigned short m_stream_id
unsigned long CarouselId(void) const
ObjCarousel(Dsmcc *dsmcc)
unsigned long DataSize(void) const
Return the, possibly uncompressed, module size.
unsigned char m_version
unsigned short ModuleId(void) const
unsigned long ModuleSize(void) const
DSMCCCacheModuleData contains information about a module and holds the blocks for a partly completed ...
unsigned char Version(void) const
The object carousel is transmitted as a directed graph.
Definition: dsmcccache.h:94
DSMCCCache m_filecache
unsigned short m_module_id
vector< unsigned short > m_Tags
Component tags matched to this carousel.
unsigned short StreamId(void) const
ModuleDescriptorData m_descriptorData