Change plugin name to guacsnd, remove use of DEFINE_SVC_PLUGIN.

This commit is contained in:
Michael Jumper 2013-07-17 10:48:41 -07:00
parent 1bbf2b21d9
commit f43591068f
2 changed files with 25 additions and 6 deletions

View File

@ -174,9 +174,9 @@ boolean rdp_freerdp_pre_connect(freerdp* instance) {
/* Load sound plugin */ /* Load sound plugin */
if (freerdp_channels_load_plugin(channels, instance->settings, if (freerdp_channels_load_plugin(channels, instance->settings,
"guac_rdpsnd", guac_client_data->audio)) "guacsnd", guac_client_data->audio))
guac_client_log_error(client, guac_client_log_error(client,
"Failed to load guac_rdpsnd plugin."); "Failed to load guacsnd plugin.");
} }
else else

View File

@ -56,12 +56,31 @@
#include "rdpsnd_service.h" #include "rdpsnd_service.h"
#include "rdpsnd_messages.h" #include "rdpsnd_messages.h"
/**
* Entry point for RDPSND virtual channel.
*/
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) {
/* Define service, associate with "rdpsnd" channel */ /* Allocate plugin */
guac_rdpsndPlugin* rdpsnd =
(guac_rdpsndPlugin*) calloc(1, sizeof(guac_rdpsndPlugin));
DEFINE_SVC_PLUGIN(guac_rdpsnd, "rdpsnd", /* Init channel def */
CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP) strcpy(rdpsnd->plugin.channel_def.name, "guacsnd");
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;
}
/* /*
* Service Handlers * Service Handlers
@ -77,7 +96,7 @@ void guac_rdpsnd_process_connect(rdpSvcPlugin* plugin) {
plugin->interval_ms = 10; plugin->interval_ms = 10;
/* Log that sound has been loaded */ /* Log that sound has been loaded */
guac_client_log_info(audio->client, "guac_rdpsnd connected."); guac_client_log_info(audio->client, "guacsnd connected.");
} }