client inputs

This commit is contained in:
speyrefitte
2014-07-02 18:01:46 +02:00
parent 4fa22177b4
commit 76f45ee420
2 changed files with 25 additions and 4 deletions

View File

@@ -230,9 +230,9 @@ class Capability(CompositeType):
self.lengthCapability = UInt16Le(lambda:sizeof(self))
def CapabilityFactory():
'''
closure for capability factory
'''
"""
Closure for capability factory
"""
if self.capabilitySetType.value == CapsType.CAPSTYPE_GENERAL:
return GeneralCapability(readLen = UInt16Le(lambda:self.lengthCapability.value - 4))
elif self.capabilitySetType.value == CapsType.CAPSTYPE_BITMAP:

View File

@@ -187,6 +187,18 @@ class UpdateType(object):
UPDATETYPE_PALETTE = 0x0002
UPDATETYPE_SYNCHRONIZE = 0x0003
class InputMessageType(object):
"""
Use in slowpath input PDU
@see: http://msdn.microsoft.com/en-us/library/cc240583.aspx
"""
INPUT_EVENT_SYNC = 0x0000
INPUT_EVENT_UNUSED = 0x0002
INPUT_EVENT_SCANCODE = 0x0004
INPUT_EVENT_UNICODE = 0x0005
INPUT_EVENT_MOUSE = 0x8001
INPUT_EVENT_MOUSEX = 0x8002
class ErrorInfo(object):
"""
Error code use in Error info PDU
@@ -667,6 +679,15 @@ class ClientInputEventPDU(CompositeType):
self.numEvents = UInt16Le()
self.pad2Octets = UInt16Le()
class SlowPathInputData(CompositeType):
"""
PDU use in slowpath sending client inputs
@see: http://msdn.microsoft.com/en-us/library/cc240583.aspx
"""
def __init__(self):
CompositeType.__init__(self)
self.eventTime = UInt32Le()
self.messageType = UInt16Le()
class BitmapCompressedDataHeader(CompositeType):
"""
@@ -854,7 +875,7 @@ class PDU(LayerAutomata):
def recvServerControlGrantedPDU(self, data):
"""
Receive last control pdu the granted control pdu
Receive last control PDU the granted control PDU
@param data: Stream from transport layer
"""
dataPDU = self.readDataPDU(data)