2
0
mirror of https://github.com/esiur/esiur-js.git synced 2026-04-03 21:48:21 +00:00

Template 2.0

This commit is contained in:
2021-05-26 08:54:29 +03:00
parent f5365adec3
commit 2bf5605ef1
21 changed files with 1963 additions and 2752 deletions

View File

@@ -199,11 +199,15 @@ export default class IIPAuthPacket
this.localMethod = (data.getUint8(offset) >> 2) & 0x3;
var encrypt = ((data.getUint8(offset++) & 0x2) == 0x2);
if (this.notEnough(offset, ends, 1))
return -this.dataLengthNeeded;
if (this.remoteMethod == AuthenticationMethod.Credentials
if (this.remoteMethod == AuthenticationMethod.None)
{
if (this.localMethod == AuthenticationMethod.None)
{
// do nothing
}
}
else if (this.remoteMethod == AuthenticationMethod.Credentials
|| this.remoteMethod == AuthenticationMethod.Token)
{
if (this.localMethod == AuthenticationMethod.None)

View File

@@ -331,7 +331,8 @@ export default class IIPPacket
this.resourceId = data.getUint32(offset);
offset += 4;
}
else if (this.action == IIPPacketAction.QueryLink)
else if (this.action == IIPPacketAction.QueryLink
|| this.action == IIPPacketAction.LinkTemplates)
{
if (this.notEnough(offset, ends, 2))
return -this.dataLengthNeeded;
@@ -537,6 +538,8 @@ export default class IIPPacket
|| this.action == IIPPacketAction.ResourceChildren
|| this.action == IIPPacketAction.ResourceParents
|| this.action == IIPPacketAction.ResourceHistory
|| this.action == IIPPacketAction.LinkTemplates
// Attribute
|| this.action == IIPPacketAction.GetAllAttributes
|| this.action == IIPPacketAction.GetAttributes)

View File

@@ -18,6 +18,7 @@ export default // const IIPPacketAction =
ResourceHistory: 12,
ResourceChildren: 13,
ResourceParents: 14,
LinkTemplates: 15,
// Request Invoke
InvokeFunctionArrayArguments: 16,