C# Class Microsoft.Protocols.TestSuites.Rdprfx.RdprfxAdapter

Show file Open project: Microsoft/WindowsProtocolTestSuites

Public Methods

Method Description
Accept ( ) : void

Wait for connection.

Accept ( RdpbcgrServer rdpbcgrServer, RdpbcgrServerSessionContext serverContext ) : void

Accept an existing RDP session which established outside.

CheckIfClientSupports ( OperationalMode opMode, EntropyAlgorithm entropy ) : bool

Method to check if the input pair of the operation mode and entropy algorithm is supported by the client.

ExpectTsFrameAcknowledgePdu ( uint expectedFrameId, System.TimeSpan ackTimeout ) : void

This method expect a TS_FRAME_ACKNOWLEDGE_PDU from client.

FlushEncodedData ( ushort destLeft, ushort destTop, ushort width = RdprfxServer.TileSize, ushort height = RdprfxServer.TileSize ) : void

Method to send all pending encoded data of a frame to RDP client.

GetEncodedData ( ) : byte[]

Method to convert all encoded data into byte array.

Initialize ( ITestSite testSite ) : void
ReceiveAndCheckClientCapabilities ( uint serverMaxRequestSize, TS_RFX_ICAP &supportedRfxCaps ) : void

Method to receive and decode client capabilities.

ReceiveAndCheckClientCoreData ( ) : void

Method to receive, decode and check client connection type and color depth.

Reset ( ) : void
SendImageToClient ( System image, OperationalMode opMode, EntropyAlgorithm entropy, ushort destLeft, ushort destTop ) : void

Method to send one frame of encoded data message to client.

SendImageToClientWithoutEncoding ( System image, ushort destLeft, ushort destTop ) : void

Method to send one frame of unencoded data message to client.

SendTsRfxChannels ( ) : void

Method to send TS_RFX_CHANNELS to client.

SendTsRfxChannels ( short width, short height ) : void

Method to send TS_RFX_CHANNELS to client.

SendTsRfxCodecVersions ( ) : void

Method to send TS_RFX_CODEC_VERSIONS to client.

SendTsRfxContext ( OperationalMode opMode, EntropyAlgorithm entropy ) : void

Method to send TS_RFX_CONTEXT to client.

SendTsRfxFrameBegin ( uint frameIdx ) : void

Method to send TS_RFX_FRAME_BEGIN to client.

SendTsRfxFrameEnd ( ) : void

Method to send TS_RFX_FRAME_END to client.

SendTsRfxRegion ( Rectangle rects = null, bool numRectsZero = false ) : void

Method to send TS_RFX_REGION to client.

SendTsRfxSync ( ) : void

Method to send TS_RFX_SYNC to client.

SendTsRfxTileSet ( OperationalMode opMode, EntropyAlgorithm entropy, System.Image tileImages, TILE_POSITION positions, TS_RFX_CODEC_QUANT codecQuantVals = null, byte quantIdxYs = null, byte quantIdxCbs = null, byte quantIdxCrs = null ) : void

Method to send TS_RFX_TILESET to client.

SendTsRfxTileSet ( OperationalMode opMode, EntropyAlgorithm entropy, System.Image tileImage, TS_RFX_CODEC_QUANT codecQuantVals = null, byte quantIdxY, byte quantIdxCb, byte quantIdxCr ) : void

Method to send TS_RFX_TILESET to client.

SetTestType ( RdprfxNegativeType testType ) : void

Set the type of current test.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
AddToPendingList ( IMarshalable rfxMessage ) : void

Send a Rdprfx message.

Create_TS_BITMAP_DATA_EX ( TSBitmapDataExFlags_Values flags, byte codecId ) : TS_BITMAP_DATA_EX
Create_TS_COMPRESSED_BITMAP_HEADER_EX ( ) : TS_COMPRESSED_BITMAP_HEADER_EX
Create_TS_SURFCMD_STREAM_SURF_BITS ( TSBitmapDataExFlags_Values flags, byte codecId ) : TS_SURFCMD_STREAM_SURF_BITS
LogServerADMInfo ( ) : void
SendSurfaceCmd_StreamSurfBits ( TS_SURFCMD_STREAM_SURF_BITS surfStreamCmd ) : void

Method to send RDPRFX raw data.

is_REMOTEFX_CODEC_GUID ( TS_BITMAPCODEC_GUID guidObj ) : bool

Method Details

Accept() public method

Wait for connection.
public Accept ( ) : void
return void

Accept() public method

Accept an existing RDP session which established outside.
public Accept ( RdpbcgrServer rdpbcgrServer, RdpbcgrServerSessionContext serverContext ) : void
rdpbcgrServer RdpbcgrServer RdpbcgrServer object.
serverContext Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.RdpbcgrServerSessionContext RdpbcgrServerSessionContext object.
return void

CheckIfClientSupports() public method

Method to check if the input pair of the operation mode and entropy algorithm is supported by the client.
public CheckIfClientSupports ( OperationalMode opMode, EntropyAlgorithm entropy ) : bool
opMode OperationalMode The operation mode.
entropy EntropyAlgorithm The entropy algorithm.
return bool

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

ExpectTsFrameAcknowledgePdu() public method

This method expect a TS_FRAME_ACKNOWLEDGE_PDU from client.
public ExpectTsFrameAcknowledgePdu ( uint expectedFrameId, System.TimeSpan ackTimeout ) : void
expectedFrameId uint The expected frame id.
ackTimeout System.TimeSpan The time span to wait.
return void

FlushEncodedData() public method

Method to send all pending encoded data of a frame to RDP client.
public FlushEncodedData ( ushort destLeft, ushort destTop, ushort width = RdprfxServer.TileSize, ushort height = RdprfxServer.TileSize ) : void
destLeft ushort Left bound of the frame.
destTop ushort Left bound of the frame.
width ushort The width of the frame.
height ushort The height of the frame.
return void

GetEncodedData() public method

Method to convert all encoded data into byte array.
public GetEncodedData ( ) : byte[]
return byte[]

Initialize() public method

public Initialize ( ITestSite testSite ) : void
testSite ITestSite
return void

ReceiveAndCheckClientCapabilities() public method

Method to receive and decode client capabilities.
public ReceiveAndCheckClientCapabilities ( uint serverMaxRequestSize, TS_RFX_ICAP &supportedRfxCaps ) : void
serverMaxRequestSize uint The MaxRequestSize field of the server-to-client Multifragment Update Capability Set.
supportedRfxCaps TS_RFX_ICAP Output the TS_RFX_ICAP array supported by the client.
return void

ReceiveAndCheckClientCoreData() public method

Method to receive, decode and check client connection type and color depth.
public ReceiveAndCheckClientCoreData ( ) : void
return void

Reset() public method

public Reset ( ) : void
return void

SendImageToClient() public method

Method to send one frame of encoded data message to client.
public SendImageToClient ( System image, OperationalMode opMode, EntropyAlgorithm entropy, ushort destLeft, ushort destTop ) : void
image System The image to be sent.
opMode OperationalMode Indicates the operational mode.
entropy EntropyAlgorithm Indicates the entropy algorithm.
destLeft ushort Left bound of the frame.
destTop ushort Left bound of the frame.
return void

SendImageToClientWithoutEncoding() public method

Method to send one frame of unencoded data message to client.
public SendImageToClientWithoutEncoding ( System image, ushort destLeft, ushort destTop ) : void
image System The image to be sent.
destLeft ushort Left bound of the frame.
destTop ushort Left bound of the frame.
return void

SendTsRfxChannels() public method

Method to send TS_RFX_CHANNELS to client.
public SendTsRfxChannels ( ) : void
return void

SendTsRfxChannels() public method

Method to send TS_RFX_CHANNELS to client.
public SendTsRfxChannels ( short width, short height ) : void
width short The width of the channel
height short The height of the channel
return void

SendTsRfxCodecVersions() public method

Method to send TS_RFX_CODEC_VERSIONS to client.
public SendTsRfxCodecVersions ( ) : void
return void

SendTsRfxContext() public method

Method to send TS_RFX_CONTEXT to client.
public SendTsRfxContext ( OperationalMode opMode, EntropyAlgorithm entropy ) : void
opMode OperationalMode
entropy EntropyAlgorithm Indicates the entropy algorithm.
return void

SendTsRfxFrameBegin() public method

Method to send TS_RFX_FRAME_BEGIN to client.
public SendTsRfxFrameBegin ( uint frameIdx ) : void
frameIdx uint The frame index.
return void

SendTsRfxFrameEnd() public method

Method to send TS_RFX_FRAME_END to client.
public SendTsRfxFrameEnd ( ) : void
return void

SendTsRfxRegion() public method

Method to send TS_RFX_REGION to client.
public SendTsRfxRegion ( Rectangle rects = null, bool numRectsZero = false ) : void
rects Rectangle Array of rects, if this parameter is null, will send a 64*64 rect
numRectsZero bool A boolean varialbe to indicate whether the numRectsZero field of TS_RFX_REGION is zero
return void

SendTsRfxSync() public method

Method to send TS_RFX_SYNC to client.
public SendTsRfxSync ( ) : void
return void

SendTsRfxTileSet() public method

Method to send TS_RFX_TILESET to client.
public SendTsRfxTileSet ( OperationalMode opMode, EntropyAlgorithm entropy, System.Image tileImages, TILE_POSITION positions, TS_RFX_CODEC_QUANT codecQuantVals = null, byte quantIdxYs = null, byte quantIdxCbs = null, byte quantIdxCrs = null ) : void
opMode OperationalMode Indicates the operational mode.
entropy EntropyAlgorithm Indicates the entropy algorithm.
tileImages System.Image The image array for tiles to be sent. The width and height must be less than or equals with 64.
positions TILE_POSITION A TILE_POSITION array indicating the positions of each tile images
codecQuantVals TS_RFX_CODEC_QUANT Quant values array
quantIdxYs byte Index array of Y component in Quant value array
quantIdxCbs byte Index array of Cb component in Quant value array
quantIdxCrs byte Index array of Cr component in Quant value array
return void

SendTsRfxTileSet() public method

Method to send TS_RFX_TILESET to client.
public SendTsRfxTileSet ( OperationalMode opMode, EntropyAlgorithm entropy, System.Image tileImage, TS_RFX_CODEC_QUANT codecQuantVals = null, byte quantIdxY, byte quantIdxCb, byte quantIdxCr ) : void
opMode OperationalMode
entropy EntropyAlgorithm Indicates the entropy algorithm.
tileImage System.Image The image for a tile. The width and height must be less than or equals with 64.
codecQuantVals TS_RFX_CODEC_QUANT Quant values array
quantIdxY byte Index of Y component in Quant value array
quantIdxCb byte Index of Cb component in Quant value array
quantIdxCr byte Index of Cr component in Quant value array
return void

SetTestType() public method

Set the type of current test.
public SetTestType ( RdprfxNegativeType testType ) : void
testType RdprfxNegativeType The test type.
return void