Use a client/common context component

* Allows moving common client code from specific client to a
  generic client/common implementation
This commit is contained in:
akallabeth
2022-01-19 09:27:39 +01:00
committed by akallabeth
parent c4e14f7fd6
commit 7641710f60
41 changed files with 696 additions and 297 deletions

View File

@@ -79,6 +79,7 @@ void tf_OnChannelConnectedEventHandler(void* context, const ChannelConnectedEven
WINPR_ASSERT(tf);
WINPR_ASSERT(e);
if (strcmp(e->name, RDPEI_DVC_CHANNEL_NAME) == 0)
{
tf->rdpei = (RdpeiClientContext*)e->pInterface;
@@ -86,7 +87,7 @@ void tf_OnChannelConnectedEventHandler(void* context, const ChannelConnectedEven
else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0)
{
RdpgfxClientContext* gfx = (RdpgfxClientContext*)e->pInterface;
gdi_graphics_pipeline_init(tf->context.gdi, gfx);
gdi_graphics_pipeline_init(tf->common.context.gdi, gfx);
}
else if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
{
@@ -109,13 +110,14 @@ void tf_OnChannelDisconnectedEventHandler(void* context, const ChannelDisconnect
WINPR_ASSERT(tf);
WINPR_ASSERT(e);
if (strcmp(e->name, RDPEI_DVC_CHANNEL_NAME) == 0)
{
tf->rdpei = NULL;
}
else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0)
{
gdi_graphics_pipeline_uninit(tf->context.gdi, (RdpgfxClientContext*)e->pInterface);
gdi_graphics_pipeline_uninit(tf->common.context.gdi, (RdpgfxClientContext*)e->pInterface);
}
else if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
{

View File

@@ -30,7 +30,7 @@
typedef struct
{
rdpContext context;
rdpClientContext common;
/* Channels */
RdpeiClientContext* rdpei;