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

Afficher le fichier Open project: Microsoft/WindowsProtocolTestSuites

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode 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 méthode

Wait for connection.
public Accept ( ) : void
Résultat void

Accept() public méthode

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.
Résultat void

CheckIfClientSupports() public méthode

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.
Résultat bool

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

ExpectTsFrameAcknowledgePdu() public méthode

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.
Résultat void

FlushEncodedData() public méthode

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.
Résultat void

GetEncodedData() public méthode

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

Initialize() public méthode

public Initialize ( ITestSite testSite ) : void
testSite ITestSite
Résultat void

ReceiveAndCheckClientCapabilities() public méthode

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.
Résultat void

ReceiveAndCheckClientCoreData() public méthode

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

Reset() public méthode

public Reset ( ) : void
Résultat void

SendImageToClient() public méthode

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.
Résultat void

SendImageToClientWithoutEncoding() public méthode

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.
Résultat void

SendTsRfxChannels() public méthode

Method to send TS_RFX_CHANNELS to client.
public SendTsRfxChannels ( ) : void
Résultat void

SendTsRfxChannels() public méthode

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
Résultat void

SendTsRfxCodecVersions() public méthode

Method to send TS_RFX_CODEC_VERSIONS to client.
public SendTsRfxCodecVersions ( ) : void
Résultat void

SendTsRfxContext() public méthode

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

SendTsRfxFrameBegin() public méthode

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

SendTsRfxFrameEnd() public méthode

Method to send TS_RFX_FRAME_END to client.
public SendTsRfxFrameEnd ( ) : void
Résultat void

SendTsRfxRegion() public méthode

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
Résultat void

SendTsRfxSync() public méthode

Method to send TS_RFX_SYNC to client.
public SendTsRfxSync ( ) : void
Résultat void

SendTsRfxTileSet() public méthode

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
Résultat void

SendTsRfxTileSet() public méthode

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
Résultat void

SetTestType() public méthode

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