FreeRDP
Loading...
Searching...
No Matches
shadow_channels.c
1
19#include <freerdp/config.h>
20
21#include <freerdp/channels/cliprdr.h>
22
23#include "shadow.h"
24
25#include "shadow_channels.h"
26#include "shadow_cliprdr.h"
27
28UINT shadow_client_channels_post_connect(rdpShadowClient* client)
29{
30 if (WTSVirtualChannelManagerIsChannelJoined(client->vcm, ENCOMSP_SVC_CHANNEL_NAME))
31 {
32 if (shadow_client_encomsp_init(client) < 0)
33 return ERROR_NOT_READY;
34 }
35
36 if (WTSVirtualChannelManagerIsChannelJoined(client->vcm, REMDESK_SVC_CHANNEL_NAME))
37 {
38 if (shadow_client_remdesk_init(client) < 0)
39 return ERROR_NOT_READY;
40 }
41
42 if (WTSVirtualChannelManagerIsChannelJoined(client->vcm, RDPSND_CHANNEL_NAME))
43 {
44 if (shadow_client_rdpsnd_init(client) < 0)
45 return ERROR_NOT_READY;
46 }
47
48 if (!shadow_client_audin_init(client))
49 return ERROR_NOT_READY;
50
51 if (WTSVirtualChannelManagerIsChannelJoined(client->vcm, CLIPRDR_SVC_CHANNEL_NAME))
52 {
53 if (shadow_client_cliprdr_init(client) < 0)
54 return ERROR_NOT_READY;
55 }
56
57 if (shadow_client_rdpgfx_init(client) < 0)
58 return ERROR_NOT_READY;
59
60 return CHANNEL_RC_OK;
61}
62
63void shadow_client_channels_free(rdpShadowClient* client)
64{
65 shadow_client_rdpgfx_uninit(client);
66 shadow_client_cliprdr_uninit(client);
67 shadow_client_audin_uninit(client);
68 shadow_client_rdpsnd_uninit(client);
69 shadow_client_remdesk_uninit(client);
70 shadow_client_encomsp_uninit(client);
71}