Add T-Tag placeholder in sign protocol
This commit is contained in:
parent
ebccc44cdf
commit
8e25669a0e
@ -77,6 +77,7 @@ AbstractProtocol::FieldFlags SignProtocol::fieldFlags(int index) const
|
|||||||
{
|
{
|
||||||
case sign_magic:
|
case sign_magic:
|
||||||
case sign_tlv_guid:
|
case sign_tlv_guid:
|
||||||
|
case sign_tlv_ttag:
|
||||||
case sign_tlv_end:
|
case sign_tlv_end:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -116,6 +117,29 @@ QVariant SignProtocol::fieldData(int index, FieldAttrib attrib,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case sign_tlv_ttag:
|
||||||
|
{
|
||||||
|
switch(attrib)
|
||||||
|
{
|
||||||
|
case FieldName:
|
||||||
|
return QString("T-Tag");
|
||||||
|
case FieldValue:
|
||||||
|
return 0;
|
||||||
|
case FieldTextValue:
|
||||||
|
return QString("%1").arg(0);
|
||||||
|
case FieldFrameValue:
|
||||||
|
{
|
||||||
|
QByteArray fv;
|
||||||
|
fv.resize(2);
|
||||||
|
fv[0] = 0;
|
||||||
|
fv[1] = kTypeLenTtagPlaceholder;
|
||||||
|
return fv;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case sign_tlv_guid:
|
case sign_tlv_guid:
|
||||||
{
|
{
|
||||||
quint32 guid = data.stream_guid() & 0xFFFFFF;
|
quint32 guid = data.stream_guid() & 0xFFFFFF;
|
||||||
|
@ -42,6 +42,8 @@ TLVs are encoded as
|
|||||||
Defined TLVs
|
Defined TLVs
|
||||||
Type = 0, Len = 0 (0x00): End of TLVs
|
Type = 0, Len = 0 (0x00): End of TLVs
|
||||||
Type = 1, Len = 3 (0x61): Stream GUID
|
Type = 1, Len = 3 (0x61): Stream GUID
|
||||||
|
Type = 2, Len = 1 (0x22): T-Tag Placeholder (0 value)
|
||||||
|
Type = 3, Len = 1 (0x23): T-Tag with actual value
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SignProtocol : public AbstractProtocol
|
class SignProtocol : public AbstractProtocol
|
||||||
@ -52,6 +54,7 @@ public:
|
|||||||
// Frame Fields
|
// Frame Fields
|
||||||
sign_tlv_end = 0,
|
sign_tlv_end = 0,
|
||||||
sign_tlv_guid,
|
sign_tlv_guid,
|
||||||
|
sign_tlv_ttag,
|
||||||
sign_magic,
|
sign_magic,
|
||||||
|
|
||||||
// Meta Fields
|
// Meta Fields
|
||||||
@ -88,6 +91,8 @@ private:
|
|||||||
static const quint32 kSignMagic = 0x1d10c0da; // coda! (unicode - 0x1d10c)
|
static const quint32 kSignMagic = 0x1d10c0da; // coda! (unicode - 0x1d10c)
|
||||||
static const quint8 kTypeLenEnd = 0x00;
|
static const quint8 kTypeLenEnd = 0x00;
|
||||||
static const quint8 kTypeLenGuid = 0x61;
|
static const quint8 kTypeLenGuid = 0x61;
|
||||||
|
static const quint8 kTypeLenTtagPlaceholder = 0x22;
|
||||||
|
static const quint8 kTypeLenTtag = 0x23;
|
||||||
OstProto::Sign data;
|
OstProto::Sign data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user