Exemplo n.º 1
0
static VOID VCAPITYPE remdesk_virtual_channel_init_event(LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
{
	remdeskPlugin* remdesk;

	remdesk = (remdeskPlugin*) remdesk_get_init_handle_data(pInitHandle);

	if (!remdesk)
	{
		WLog_ERR(TAG,  "error no match");
		return;
	}

	switch (event)
	{
		case CHANNEL_EVENT_CONNECTED:
			remdesk_virtual_channel_event_connected(remdesk, pData, dataLength);
			break;

		case CHANNEL_EVENT_DISCONNECTED:
			break;

		case CHANNEL_EVENT_TERMINATED:
			remdesk_virtual_channel_event_terminated(remdesk);
			break;
	}
}
Exemplo n.º 2
0
static VOID VCAPITYPE remdesk_virtual_channel_init_event(LPVOID pInitHandle,
							 UINT event, LPVOID pData,
							 UINT dataLength)
{
	remdeskPlugin* remdesk;
	UINT error = CHANNEL_RC_OK;

	remdesk = (remdeskPlugin*) remdesk_get_init_handle_data(pInitHandle);

	if (!remdesk)
	{
		WLog_ERR(TAG,  "error no match");
		return;
	}

	switch (event)
	{
		case CHANNEL_EVENT_CONNECTED:
			if ((error = remdesk_virtual_channel_event_connected(remdesk, pData, dataLength)))
				WLog_ERR(TAG,  "remdesk_virtual_channel_event_connected failed with error %lu", error);
			break;

		case CHANNEL_EVENT_DISCONNECTED:
			if ((error = remdesk_virtual_channel_event_disconnected(remdesk)))
				WLog_ERR(TAG,  "remdesk_virtual_channel_event_disconnected failed with error %lu", error);
			break;

		case CHANNEL_EVENT_TERMINATED:
			remdesk_virtual_channel_event_terminated(remdesk);
			break;
	}
	if (error && remdesk->rdpcontext)
		setChannelError(remdesk->rdpcontext, error, "remdesk_virtual_channel_init_event reported an error");
}