Go to the documentation of this file.
53 LOG(VB_DSMCC, LOG_WARNING,
"[biop] Expected one name");
111 unsigned char *data,
unsigned long *curp)
116 LOG(VB_DSMCC, LOG_ERR,
117 "[biop] Invalid biop header, dropping rest of module");
126 LOG(VB_DSMCC, LOG_DEBUG,
"[biop] Processing file");
131 LOG(VB_DSMCC, LOG_DEBUG,
"[biop] Processing directory");
132 return ProcessDir(
false, cachep, filecache, data, curp);
136 LOG(VB_DSMCC, LOG_DEBUG,
"[biop] Processing gateway");
137 return ProcessDir(
true, cachep, filecache, data, curp);
141 LOG(VB_DSMCC, LOG_WARNING, QString(
"Unknown or unsupported format %1%2%3%4")
155 const unsigned char *buf = data + (*curp);
158 if (buf[off] !=
'B' || buf[off +1] !=
'I' || buf[off +2] !=
'O' || buf[off +3] !=
'P')
160 LOG(VB_DSMCC, LOG_WARNING,
"BiopMessage - invalid header");
169 LOG(VB_DSMCC, LOG_WARNING,
"BiopMessage invalid version");
175 LOG(VB_DSMCC, LOG_WARNING,
"BiopMessage invalid byte order");
180 LOG(VB_DSMCC, LOG_WARNING,
"BiopMessage invalid message type");
187 uint nObjLen = buf[off++];
219 const unsigned char *data,
unsigned long *curp)
222 const unsigned char *
const buf = data + (*curp);
225 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessDir non-zero objectInfo_length");
227 const unsigned serviceContextList_count = buf[off++];
228 if (serviceContextList_count)
231 LOG(VB_DSMCC, LOG_WARNING, QString(
"[biop] ProcessDir serviceContextList count %1")
232 .arg(serviceContextList_count));
236 unsigned long msgbody_len =
COMBINE32(buf, off);
238 int const start = off;
240 unsigned int bindings_count = buf[off] << 8 | buf[off + 1];
247 for (
uint i = 0; i < bindings_count; i++)
250 int ret = binding.
Process(buf + off);
257 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessDir nameComponents != 1");
260 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessDir invalid BindingType");
272 LOG(VB_DSMCC, LOG_WARNING, QString(
"[biop] ProcessDir unknown kind %1")
277 if ((
unsigned)(off - start) != msgbody_len)
278 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessDir incorrect msgbody_len");
286 unsigned char *data,
unsigned long *curp)
289 const unsigned char *buf = data + (*curp);
292 LOG(VB_DSMCC, LOG_WARNING, QString(
"[biop] ProcessFile objectInfo_length = %1")
295 const unsigned serviceContextList_count = buf[off++];
296 if (serviceContextList_count)
298 LOG(VB_DSMCC, LOG_WARNING,
299 QString(
"[biop] ProcessFile Unexpected serviceContextList_count %1")
300 .arg(serviceContextList_count));
304 unsigned long msgbody_len =
COMBINE32(buf, off);
306 unsigned long content_len =
COMBINE32(buf, off);
308 if (content_len + 4 != msgbody_len)
309 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessFile incorrect msgbody_len");
316 QByteArray filedata = QByteArray((
const char *)data+(*curp), content_len);
319 (*curp) += content_len;
327 unsigned char tag = *data++;
328 unsigned char len = *data++;
362 LOG(VB_DSMCC, LOG_DEBUG, QString(
"[Biop] "
363 "ModuleTimeout %1 BlockTimeout %2 MinBlockTime %3 Taps %4")
376 unsigned userinfo_len = data[off++];
378 if (userinfo_len > 0)
391 m_id = (data[off] << 8) | data[off + 1];
393 m_use = (data[off] << 8) | data[off + 1];
395 m_assocTag = (data[off] << 8) | data[off + 1];
402 unsigned selector_type = (data[off] << 8) | data[off + 1];
406 unsigned long transactionId =
COMBINE32(data, off);
409 LOG(VB_DSMCC, LOG_DEBUG, QString(
"[biop] BIOP_DELIVERY_PARA_USE tag %1 id 0x%2 timeout %3uS")
427 LOG(VB_DSMCC, LOG_WARNING,
"[biop] Invalid Connbinder tag");
438 LOG(VB_GENERAL, LOG_DEBUG, QString(
"Binder - assoc_tag %1")
456 LOG(VB_DSMCC, LOG_WARNING,
"[biop] Invalid ObjectLocation tag");
473 LOG(VB_DSMCC, LOG_WARNING,
"[biop] Invalid ObjectLocation version");
477 uint objKeyLen = data[off++];
487 LOG(VB_DSMCC, LOG_WARNING,
"Found LiteProfileBody - Not Implemented Yet");
499 if (data[off++] != 0)
501 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProfileBody invalid byte order");
508 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProfileBody invalid components_count");
541 LOG(VB_DSMCC, LOG_WARNING,
"[biop] IOR missing taggedProfile");
568 LOG(VB_DSMCC, LOG_WARNING, QString(
"[biop] Unknown Ior profile 0x%1")
unsigned long m_profileIdTag
ProfileBody * m_profileBody
unsigned long m_typeIdLen
bool ProcessDir(bool isSrg, DSMCCCacheModuleData *cachep, DSMCCCache *cache, const unsigned char *data, unsigned long *curp)
Process a Directory message.
unsigned long CarouselId(void) const
bool ProcessMsgHdr(const unsigned char *data, unsigned long *curp)
int Process(const unsigned char *data)
DSMCCCacheModuleData contains information about a module and holds the blocks for a partly completed ...
bool ProcessFile(DSMCCCacheModuleData *cachep, DSMCCCache *cache, unsigned char *data, unsigned long *curp)
unsigned long m_nCarouselId
unsigned char m_compCount
unsigned int m_objInfoLen
static void AddFileInfo(DSMCCCacheDir *dir, const BiopBinding *pBB)
static void AddDirInfo(DSMCCCacheDir *dir, const BiopBinding *pBB)
int Process(const unsigned char *Data)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
unsigned short m_assocTag
int Process(const unsigned char *data) override
int Process(const unsigned char *data)
unsigned short m_selectorLen
void Process(const unsigned char *data, int length)
DSMCCCacheDir * Directory(const DSMCCCacheReference &ref)
int Process(const unsigned char *data)
int Process(const unsigned char *data) override
unsigned short m_nStreamTag
ModuleDescriptorData m_descriptorData
int Process(const unsigned char *data)
unsigned char m_versionMajor
virtual DSMCCCacheReference * GetReference()=0
void AddTap(Dsmcc *pStatus) const
DSMCCCacheDir * Srg(const DSMCCCacheReference &ref)
unsigned long m_taggedProfilesCount
ObjCarousel * AddTap(unsigned short componentTag, unsigned carouselId)
Add a tap.
unsigned long m_minBlockTime
DSMCCCacheReference m_reference
unsigned long m_originalSize
int Process(const unsigned char *data)
unsigned char m_versionMinor
int Process(const unsigned char *data)
unsigned short StreamId(void) const
unsigned long m_componentTag
unsigned long m_componentTag
bool Process(DSMCCCacheModuleData *cachep, DSMCCCache *cache, unsigned char *data, unsigned long *curp)
unsigned int m_messageSize
unsigned long m_objKindLen
unsigned int m_objInfoLen
unsigned short ModuleId(void) const
int Process(const unsigned char *data)
static constexpr uint32_t COMBINE32(const uint8_t *data, int idx)
unsigned short m_nModuleId
unsigned char m_tapsCount
unsigned long m_blockTimeout
void CacheFileData(const DSMCCCacheReference &ref, const QByteArray &data)
unsigned char m_componentDataLen
unsigned long m_modTimeout
char m_liteComponentsCount
virtual int Process(const unsigned char *)=0
unsigned char m_tapsCount