예제 #1
0
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
	cliprdrPlugin* cliprdr;
	CliprdrClientContext* context;
	CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;
	cliprdr = (cliprdrPlugin*) calloc(1, sizeof(cliprdrPlugin));
	cliprdr->plugin.channel_def.options =
		CHANNEL_OPTION_INITIALIZED |
		CHANNEL_OPTION_ENCRYPT_RDP |
		CHANNEL_OPTION_COMPRESS_RDP |
		CHANNEL_OPTION_SHOW_PROTOCOL;
	strcpy(cliprdr->plugin.channel_def.name, "cliprdr");
	cliprdr->plugin.connect_callback = cliprdr_process_connect;
	cliprdr->plugin.receive_callback = cliprdr_process_receive;
	cliprdr->plugin.event_callback = cliprdr_process_event;
	cliprdr->plugin.terminate_callback = cliprdr_process_terminate;
	pEntryPointsEx = (CHANNEL_ENTRY_POINTS_FREERDP*) pEntryPoints;

	if ((pEntryPointsEx->cbSize >= sizeof(CHANNEL_ENTRY_POINTS_FREERDP)) &&
			(pEntryPointsEx->MagicNumber == FREERDP_CHANNEL_MAGIC_NUMBER))
	{
		context = (CliprdrClientContext*) calloc(1, sizeof(CliprdrClientContext));
		context->handle = (void*) cliprdr;
		context->ClientCapabilities = cliprdr_client_capabilities;
		context->ClientFormatList = cliprdr_client_format_list;
		context->ClientFormatListResponse = cliprdr_client_format_list_response;
		context->ClientFormatDataRequest = cliprdr_client_format_data_request;
		context->ClientFormatDataResponse = cliprdr_client_format_data_response;
		*(pEntryPointsEx->ppInterface) = (void*) context;
	}

	svc_plugin_init((rdpSvcPlugin*) cliprdr, pEntryPoints);
	return 1;
}
예제 #2
0
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
	drdynvcPlugin* _p;
	DrdynvcClientContext* context;
	CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;

	_p = (drdynvcPlugin*) calloc(1, sizeof(drdynvcPlugin));

	if (!_p)
		return FALSE;

	_p->plugin.channel_def.options =
		CHANNEL_OPTION_INITIALIZED |
		CHANNEL_OPTION_ENCRYPT_RDP |
		CHANNEL_OPTION_COMPRESS_RDP;

	strcpy(_p->plugin.channel_def.name, "drdynvc");

	_p->state = DRDYNVC_STATE_INITIAL;

	_p->plugin.connect_callback = drdynvc_process_connect;
	_p->plugin.receive_callback = drdynvc_process_receive;
	_p->plugin.event_callback = drdynvc_process_event;
	_p->plugin.terminate_callback = drdynvc_process_terminate;

	pEntryPointsEx = (CHANNEL_ENTRY_POINTS_FREERDP*) pEntryPoints;

	if ((pEntryPointsEx->cbSize >= sizeof(CHANNEL_ENTRY_POINTS_FREERDP)) &&
			(pEntryPointsEx->MagicNumber == FREERDP_CHANNEL_MAGIC_NUMBER))
	{
		context = (DrdynvcClientContext*) calloc(1, sizeof(DrdynvcClientContext));

		if (!context)
			return -1;

		context->handle = (void*) _p;
		_p->context = context;

		context->GetVersion = drdynvc_get_version;

		*(pEntryPointsEx->ppInterface) = (void*) context;
	}

	svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints);

	return 1;
}
예제 #3
0
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
	cliprdrPlugin* _p;
	CliprdrClientContext* context;
	CHANNEL_ENTRY_POINTS_EX* pEntryPointsEx;

	_p = (cliprdrPlugin*) malloc(sizeof(cliprdrPlugin));
	ZeroMemory(_p, sizeof(cliprdrPlugin));

	_p->plugin.channel_def.options =
			CHANNEL_OPTION_INITIALIZED |
			CHANNEL_OPTION_ENCRYPT_RDP |
			CHANNEL_OPTION_COMPRESS_RDP |
			CHANNEL_OPTION_SHOW_PROTOCOL;

	strcpy(_p->plugin.channel_def.name, "cliprdr");

	_p->plugin.connect_callback = cliprdr_process_connect;
	_p->plugin.receive_callback = cliprdr_process_receive;
	_p->plugin.event_callback = cliprdr_process_event;
	_p->plugin.terminate_callback = cliprdr_process_terminate;

	pEntryPointsEx = (CHANNEL_ENTRY_POINTS_EX*) pEntryPoints;

	if ((pEntryPointsEx->cbSize >= sizeof(CHANNEL_ENTRY_POINTS_EX)) &&
			(pEntryPointsEx->MagicNumber == FREERDP_CHANNEL_MAGIC_NUMBER))
	{
		context = (CliprdrClientContext*) malloc(sizeof(CliprdrClientContext));

		context->MonitorReady = cliprdr_monitor_ready;
		context->FormatList = cliprdr_format_list;
		context->DataRequest = cliprdr_data_request;
		context->DataResponse = cliprdr_data_response;

		*(pEntryPointsEx->ppInterface) = (void*) context;
	}

	svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints);

	return 1;
}
예제 #4
0
/**
 * Entry point for RDPSND virtual channel.
 */
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) {

    /* Allocate plugin */
    guac_rdpsndPlugin* rdpsnd =
        (guac_rdpsndPlugin*) calloc(1, sizeof(guac_rdpsndPlugin));

    /* Init channel def */
    strcpy(rdpsnd->plugin.channel_def.name, "rdpsnd");
    rdpsnd->plugin.channel_def.options =
        CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP;

    /* Set callbacks */
    rdpsnd->plugin.connect_callback   = guac_rdpsnd_process_connect;
    rdpsnd->plugin.receive_callback   = guac_rdpsnd_process_receive;
    rdpsnd->plugin.event_callback     = guac_rdpsnd_process_event;
    rdpsnd->plugin.terminate_callback = guac_rdpsnd_process_terminate;

    /* Finish init */
    svc_plugin_init((rdpSvcPlugin*) rdpsnd, pEntryPoints);
    return 1;

}
예제 #5
0
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
	samplePlugin* _p;

	_p = (samplePlugin*) malloc(sizeof(samplePlugin));
	ZeroMemory(_p, sizeof(samplePlugin));

	_p->plugin.channel_def.options =
			CHANNEL_OPTION_INITIALIZED |
			CHANNEL_OPTION_ENCRYPT_RDP;

	strcpy(_p->plugin.channel_def.name, "sample");

	_p->plugin.connect_callback = sample_process_connect;
	_p->plugin.receive_callback = sample_process_receive;
	_p->plugin.event_callback = sample_process_event;
	_p->plugin.terminate_callback = sample_process_terminate;

	svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints);

	return 1;
}
/**
 * Entry point for arbitrary SVC.
 */
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) {

    /* Gain access to plugin data */
    CHANNEL_ENTRY_POINTS_FREERDP* entry_points_ex =
        (CHANNEL_ENTRY_POINTS_FREERDP*) pEntryPoints;

    /* Allocate plugin */
    guac_svcPlugin* svc_plugin =
        (guac_svcPlugin*) calloc(1, sizeof(guac_svcPlugin));

    /* Get SVC descriptor from plugin parameters */
    guac_rdp_svc* svc = (guac_rdp_svc*) entry_points_ex->pExtendedData;

    /* Init channel def */
    strncpy(svc_plugin->plugin.channel_def.name, svc->name,
            GUAC_RDP_SVC_MAX_LENGTH);
    svc_plugin->plugin.channel_def.options = 
          CHANNEL_OPTION_INITIALIZED
        | CHANNEL_OPTION_ENCRYPT_RDP
        | CHANNEL_OPTION_COMPRESS_RDP;

    /* Init plugin */
    svc_plugin->svc = svc;

    /* Set callbacks */
    svc_plugin->plugin.connect_callback   = guac_svc_process_connect;
    svc_plugin->plugin.receive_callback   = guac_svc_process_receive;
    svc_plugin->plugin.event_callback     = guac_svc_process_event;
    svc_plugin->plugin.terminate_callback = guac_svc_process_terminate;

    /* Store plugin reference in SVC */
    svc->plugin = (rdpSvcPlugin*) svc_plugin;

    /* Finish init */
    svc_plugin_init((rdpSvcPlugin*) svc_plugin, pEntryPoints);
    return 1;

}
예제 #7
0
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
	cliprdrPlugin* _p;

	_p = (cliprdrPlugin*) malloc(sizeof(cliprdrPlugin));
	ZeroMemory(_p, sizeof(cliprdrPlugin));

	_p->plugin.channel_def.options =
			CHANNEL_OPTION_INITIALIZED |
			CHANNEL_OPTION_ENCRYPT_RDP |
			CHANNEL_OPTION_COMPRESS_RDP |
			CHANNEL_OPTION_SHOW_PROTOCOL;

	strcpy(_p->plugin.channel_def.name, "cliprdr");

	_p->plugin.connect_callback = cliprdr_process_connect;
	_p->plugin.receive_callback = cliprdr_process_receive;
	_p->plugin.event_callback = cliprdr_process_event;
	_p->plugin.terminate_callback = cliprdr_process_terminate;

	svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints);

	return 1;
}
예제 #8
0
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
	railPlugin* rail;
	RailClientContext* context;
	CHANNEL_ENTRY_POINTS_FREERDP* pEntryPointsEx;

	rail = (railPlugin*) malloc(sizeof(railPlugin));
	ZeroMemory(rail, sizeof(railPlugin));

	rail->plugin.channel_def.options =
			CHANNEL_OPTION_INITIALIZED |
			CHANNEL_OPTION_ENCRYPT_RDP |
			CHANNEL_OPTION_COMPRESS_RDP |
			CHANNEL_OPTION_SHOW_PROTOCOL;

	strcpy(rail->plugin.channel_def.name, "rail");

	rail->plugin.connect_callback = rail_process_connect;
	rail->plugin.receive_callback = rail_process_receive;
	rail->plugin.event_callback = rail_process_event;
	rail->plugin.terminate_callback = rail_process_terminate;

	pEntryPointsEx = (CHANNEL_ENTRY_POINTS_FREERDP*) pEntryPoints;

	if ((pEntryPointsEx->cbSize >= sizeof(CHANNEL_ENTRY_POINTS_FREERDP)) &&
			(pEntryPointsEx->MagicNumber == FREERDP_CHANNEL_MAGIC_NUMBER))
	{
		context = (RailClientContext*) malloc(sizeof(RailClientContext));

		context->handle = (void*) rail;

		context->ClientExecute = rail_client_execute;
		context->ClientActivate = rail_client_activate;
		context->ClientSystemParam = rail_client_system_param;
		context->ServerSystemParam = rail_server_system_param;
		context->ClientSystemCommand = rail_client_system_command;
		context->ClientHandshake = rail_client_handshake;
		context->ServerHandshake = rail_server_handshake;
		context->ClientHandshakeEx = rail_client_handshake_ex;
		context->ServerHandshakeEx = rail_server_handshake_ex;
		context->ClientNotifyEvent = rail_client_notify_event;
		context->ClientWindowMove = rail_client_window_move;
		context->ServerLocalMoveSize = rail_server_local_move_size;
		context->ServerMinMaxInfo = rail_server_min_max_info;
		context->ClientInformation = rail_client_information;
		context->ClientSystemMenu = rail_client_system_menu;
		context->ClientLanguageBarInfo = rail_client_language_bar_info;
		context->ServerLanguageBarInfo = rail_server_language_bar_info;
		context->ServerExecuteResult = rail_server_execute_result;
		context->ClientGetAppIdRequest = rail_client_get_appid_request;
		context->ServerGetAppIdResponse = rail_server_get_appid_response;

		*(pEntryPointsEx->ppInterface) = (void*) context;
	}

	WLog_Init();
	rail->log = WLog_Get("com.freerdp.channels.rail.client");

	WLog_Print(rail->log, WLOG_DEBUG, "VirtualChannelEntry");

	svc_plugin_init((rdpSvcPlugin*) rail, pEntryPoints);

	return 1;
}