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 <list>
9 #include <vector>
10 
11 class DsmccDii;
12 class Dsmcc;
13 class DsmccDb;
14 class DsmccModuleInfo;
15 
16 #include "dsmcccache.h"
17 #include "dsmccbiop.h" // For ModuleDescriptorData
18 
24 {
25  public:
27  unsigned short streamTag);
29 
30  unsigned char *AddModuleData(DsmccDb *ddb, const unsigned char *Data);
31 
32  unsigned long CarouselId(void) const { return m_carouselId; }
33  unsigned short ModuleId(void) const { return m_moduleId; }
34  unsigned short StreamId(void) const { return m_streamId; }
35  unsigned char Version(void) const { return m_version; }
36  unsigned long ModuleSize(void) const { return m_moduleSize; }
37 
39  unsigned long DataSize(void) const
40  {
43  }
44 
45 
46  private:
47  unsigned long m_carouselId;
48  unsigned short m_moduleId;
49  unsigned short m_streamId;
50 
51  unsigned char m_version;
52  unsigned long m_moduleSize;
53  unsigned long m_receivedData {0};
54 
56  std::vector<QByteArray*> m_blocks;
58  bool m_completed {false};
60 };
61 
63 {
64  public:
65  explicit ObjCarousel(Dsmcc*dsmcc) : m_fileCache(dsmcc) {}
66  ~ObjCarousel();
67  void AddModuleInfo(DsmccDii *dii, Dsmcc *status, unsigned short streamTag);
68  void AddModuleData(DsmccDb *ddb, const unsigned char *data);
69 
71  std::list<DSMCCCacheModuleData*> m_Cache;
73  std::vector<unsigned short> m_Tags;
74  unsigned long m_id {0};
75 };
76 
77 #endif
78 
DSMCCCacheModuleData::m_completed
bool m_completed
True if we have completed this module.
Definition: dsmccobjcarousel.h:58
DSMCCCacheModuleData::CarouselId
unsigned long CarouselId(void) const
Definition: dsmccobjcarousel.h:32
DsmccDb
Definition: dsmccreceiver.h:55
dsmcccache.h
DSMCCCacheModuleData
DSMCCCacheModuleData contains information about a module and holds the blocks for a partly completed ...
Definition: dsmccobjcarousel.h:23
DSMCCCacheModuleData::m_moduleSize
unsigned long m_moduleSize
Total size.
Definition: dsmccobjcarousel.h:52
DSMCCCache
Definition: dsmcccache.h:86
ObjCarousel::AddModuleInfo
void AddModuleInfo(DsmccDii *dii, Dsmcc *status, unsigned short streamTag)
Definition: dsmccobjcarousel.cpp:153
DSMCCCacheModuleData::m_receivedData
unsigned long m_receivedData
Size received so far.
Definition: dsmccobjcarousel.h:53
DsmccDii
Definition: dsmccreceiver.h:10
DSMCCCacheModuleData::DataSize
unsigned long DataSize(void) const
Return the, possibly uncompressed, module size.
Definition: dsmccobjcarousel.h:39
ObjCarousel::AddModuleData
void AddModuleData(DsmccDb *ddb, const unsigned char *data)
We have received a block for a module.
Definition: dsmccobjcarousel.cpp:227
ObjCarousel::~ObjCarousel
~ObjCarousel()
Definition: dsmccobjcarousel.cpp:146
DSMCCCacheModuleData::m_streamId
unsigned short m_streamId
Definition: dsmccobjcarousel.h:49
ObjCarousel
Definition: dsmccobjcarousel.h:62
dsmccbiop.h
DsmccModuleInfo
Definition: dsmccbiop.h:227
ObjCarousel::m_id
unsigned long m_id
Definition: dsmccobjcarousel.h:74
DSMCCCacheModuleData::ModuleSize
unsigned long ModuleSize(void) const
Definition: dsmccobjcarousel.h:36
ModuleDescriptorData::m_isCompressed
bool m_isCompressed
Definition: dsmccbiop.h:209
DSMCCCacheModuleData::m_blocks
std::vector< QByteArray * > m_blocks
Block table. As blocks are received they are added to this table.
Definition: dsmccobjcarousel.h:56
ObjCarousel::ObjCarousel
ObjCarousel(Dsmcc *dsmcc)
Definition: dsmccobjcarousel.h:65
DSMCCCacheModuleData::AddModuleData
unsigned char * AddModuleData(DsmccDb *ddb, const unsigned char *Data)
Add block to the module and create the module if it's now complete.
Definition: dsmccobjcarousel.cpp:44
ModuleDescriptorData::m_originalSize
unsigned long m_originalSize
Definition: dsmccbiop.h:210
ObjCarousel::m_Tags
std::vector< unsigned short > m_Tags
Component tags matched to this carousel.
Definition: dsmccobjcarousel.h:73
DSMCCCacheModuleData::m_version
unsigned char m_version
Definition: dsmccobjcarousel.h:51
DSMCCCacheModuleData::StreamId
unsigned short StreamId(void) const
Definition: dsmccobjcarousel.h:34
Dsmcc
Definition: dsmcc.h:77
ObjCarousel::m_fileCache
DSMCCCache m_fileCache
Definition: dsmccobjcarousel.h:70
ObjCarousel::m_Cache
std::list< DSMCCCacheModuleData * > m_Cache
Definition: dsmccobjcarousel.h:71
DSMCCCacheModuleData::Version
unsigned char Version(void) const
Definition: dsmccobjcarousel.h:35
DSMCCCacheModuleData::m_moduleId
unsigned short m_moduleId
Definition: dsmccobjcarousel.h:48
DSMCCCacheModuleData::m_carouselId
unsigned long m_carouselId
Definition: dsmccobjcarousel.h:47
DSMCCCacheModuleData::ModuleId
unsigned short ModuleId(void) const
Definition: dsmccobjcarousel.h:33
DSMCCCacheModuleData::~DSMCCCacheModuleData
~DSMCCCacheModuleData()
Definition: dsmccobjcarousel.cpp:33
DSMCCCacheModuleData::DSMCCCacheModuleData
DSMCCCacheModuleData(DsmccDii *dii, DsmccModuleInfo *info, unsigned short streamTag)
Definition: dsmccobjcarousel.cpp:19
azlyrics.info
dictionary info
Definition: azlyrics.py:7
ModuleDescriptorData
Definition: dsmccbiop.h:202
DSMCCCacheModuleData::m_descriptorData
ModuleDescriptorData m_descriptorData
Definition: dsmccobjcarousel.h:59