Use common client channel handling

This commit is contained in:
akallabeth
2022-01-19 11:05:55 +01:00
committed by akallabeth
parent 4ca5078027
commit b2b70fcf6d
12 changed files with 42 additions and 179 deletions

View File

@@ -80,16 +80,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;
}
else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0)
{
RdpgfxClientContext* gfx = (RdpgfxClientContext*)e->pInterface;
gdi_graphics_pipeline_init(tf->common.context.gdi, gfx);
}
else if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
{
}
else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
@@ -102,6 +93,8 @@ void tf_OnChannelConnectedEventHandler(void* context, const ChannelConnectedEven
{
tf_encomsp_init(tf, (EncomspClientContext*)e->pInterface);
}
else
freerdp_client_OnChannelConnectedEventHandler(context, e);
}
void tf_OnChannelDisconnectedEventHandler(void* context, const ChannelDisconnectedEventArgs* e)
@@ -111,15 +104,7 @@ 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->common.context.gdi, (RdpgfxClientContext*)e->pInterface);
}
else if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
{
}
else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
@@ -132,4 +117,6 @@ void tf_OnChannelDisconnectedEventHandler(void* context, const ChannelDisconnect
{
tf_encomsp_uninit(tf, (EncomspClientContext*)e->pInterface);
}
else
freerdp_client_OnChannelDisconnectedEventHandler(context, e);
}

View File

@@ -33,8 +33,6 @@ typedef struct
rdpClientContext common;
/* Channels */
RdpeiClientContext* rdpei;
RdpgfxClientContext* gfx;
EncomspClientContext* encomsp;
} tfContext;