Go to the documentation of this file.
53 LOG(VB_DSMCC, LOG_WARNING,
"[biop] Expected one name");
109 unsigned char *data,
unsigned long *curp)
114 LOG(VB_DSMCC, LOG_ERR,
115 "[biop] Invalid biop header, dropping rest of module");
124 LOG(VB_DSMCC, LOG_DEBUG,
"[biop] Processing file");
129 LOG(VB_DSMCC, LOG_DEBUG,
"[biop] Processing directory");
130 return ProcessDir(
false, cachep, filecache, data, curp);
134 LOG(VB_DSMCC, LOG_DEBUG,
"[biop] Processing gateway");
135 return ProcessDir(
true, cachep, filecache, data, curp);
139 LOG(VB_DSMCC, LOG_WARNING, QString(
"Unknown or unsupported format %1%2%3%4")
153 const unsigned char *buf = data + (*curp);
156 if (buf[off] !=
'B' || buf[off +1] !=
'I' || buf[off +2] !=
'O' || buf[off +3] !=
'P')
158 LOG(VB_DSMCC, LOG_WARNING,
"BiopMessage - invalid header");
167 LOG(VB_DSMCC, LOG_WARNING,
"BiopMessage invalid version");
173 LOG(VB_DSMCC, LOG_WARNING,
"BiopMessage invalid byte order");
178 LOG(VB_DSMCC, LOG_WARNING,
"BiopMessage invalid message type");
185 uint nObjLen = buf[off++];
217 const unsigned char *data,
unsigned long *curp)
220 const unsigned char *
const buf = data + (*curp);
223 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessDir non-zero objectInfo_length");
225 const unsigned serviceContextList_count = buf[off++];
226 if (serviceContextList_count)
229 LOG(VB_DSMCC, LOG_WARNING, QString(
"[biop] ProcessDir serviceContextList count %1")
230 .arg(serviceContextList_count));
234 unsigned long msgbody_len =
COMBINE32(buf, off);
236 int const start = off;
238 unsigned int bindings_count = buf[off] << 8 | buf[off + 1];
245 for (
uint i = 0; i < bindings_count; i++)
248 int ret = binding.
Process(buf + off);
255 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessDir nameComponents != 1");
258 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessDir invalid BindingType");
270 LOG(VB_DSMCC, LOG_WARNING, QString(
"[biop] ProcessDir unknown kind %1")
275 if ((
unsigned)(off - start) != msgbody_len)
276 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessDir incorrect msgbody_len");
284 unsigned char *data,
unsigned long *curp)
287 const unsigned char *buf = data + (*curp);
290 LOG(VB_DSMCC, LOG_WARNING, QString(
"[biop] ProcessFile objectInfo_length = %1")
293 const unsigned serviceContextList_count = buf[off++];
294 if (serviceContextList_count)
296 LOG(VB_DSMCC, LOG_WARNING,
297 QString(
"[biop] ProcessFile Unexpected serviceContextList_count %1")
298 .arg(serviceContextList_count));
302 unsigned long msgbody_len =
COMBINE32(buf, off);
304 unsigned long content_len =
COMBINE32(buf, off);
306 if (content_len + 4 != msgbody_len)
307 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProcessFile incorrect msgbody_len");
314 QByteArray filedata = QByteArray((
const char *)data+(*curp), content_len);
317 (*curp) += content_len;
325 unsigned char tag = *data++;
326 unsigned char len = *data++;
360 LOG(VB_DSMCC, LOG_DEBUG, QString(
"[Biop] "
361 "ModuleTimeout %1 BlockTimeout %2 MinBlockTime %3 Taps %4")
374 unsigned userinfo_len = data[off++];
376 if (userinfo_len > 0)
389 m_id = (data[off] << 8) | data[off + 1];
391 m_use = (data[off] << 8) | data[off + 1];
393 m_assocTag = (data[off] << 8) | data[off + 1];
400 unsigned selector_type = (data[off] << 8) | data[off + 1];
404 unsigned long transactionId =
COMBINE32(data, off);
407 LOG(VB_DSMCC, LOG_DEBUG, QString(
"[biop] BIOP_DELIVERY_PARA_USE tag %1 id 0x%2 timeout %3uS")
425 LOG(VB_DSMCC, LOG_WARNING,
"[biop] Invalid Connbinder tag");
436 LOG(VB_GENERAL, LOG_DEBUG, QString(
"Binder - assoc_tag %1")
454 LOG(VB_DSMCC, LOG_WARNING,
"[biop] Invalid ObjectLocation tag");
471 LOG(VB_DSMCC, LOG_WARNING,
"[biop] Invalid ObjectLocation version");
475 uint objKeyLen = data[off++];
485 LOG(VB_DSMCC, LOG_WARNING,
"Found LiteProfileBody - Not Implemented Yet");
497 if (data[off++] != 0)
499 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProfileBody invalid byte order");
506 LOG(VB_DSMCC, LOG_WARNING,
"[biop] ProfileBody invalid components_count");
539 LOG(VB_DSMCC, LOG_WARNING,
"[biop] IOR missing taggedProfile");
566 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