-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathchannel.cc
36 lines (31 loc) · 987 Bytes
/
channel.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "../context.h"
#include "rail.h"
#include "clipboard.h"
#include <freerdp/gdi/gfx.h>
#include <freerdp/log.h>
void node_OnChannelConnectedEventHandler(void* context,
ChannelConnectedEventArgs* e)
{
nodeContext* nctx = (nodeContext*)context;
rdpSettings* settings = nctx->context.settings;
if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
{
node_rail_init(nctx, (RailClientContext*)e->pInterface);
}else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
{
node_cliprdr_init(nctx, (CliprdrClientContext*)e->pInterface);
}
}
void node_OnChannelDisconnectedEventHandler(void* context,
ChannelDisconnectedEventArgs* e)
{
nodeContext* nctx = (nodeContext*)context;
rdpSettings* settings = nctx->context.settings;
if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
{
node_rail_uninit(nctx, (RailClientContext*)e->pInterface);
}else if (strcmp(e->name, CLIPRDR_SVC_CHANNEL_NAME) == 0)
{
node_cliprdr_uninit(nctx, (CliprdrClientContext*)e->pInterface);
}
}