diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c index 028cf74af..1578d26ac 100644 --- a/channels/audin/client/audin_main.c +++ b/channels/audin/client/audin_main.c @@ -811,7 +811,8 @@ static UINT audin_load_device_plugin(AUDIN_PLUGIN* audin, const char* name, cons FREERDP_AUDIN_DEVICE_ENTRY_POINTS entryPoints = { 0 }; UINT error = ERROR_INTERNAL_ERROR; const PFREERDP_AUDIN_DEVICE_ENTRY entry = - (const PFREERDP_AUDIN_DEVICE_ENTRY)freerdp_load_channel_addin_entry("audin", name, NULL, 0); + (const PFREERDP_AUDIN_DEVICE_ENTRY)freerdp_load_channel_addin_entry(AUDIN_CHANNEL_NAME, + name, NULL, 0); if (entry == NULL) { @@ -1006,7 +1007,7 @@ FREERDP_ENTRY_POINT(UINT audin_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoint struct SubsystemEntry* entry = &entries[0]; WINPR_ASSERT(pEntryPoints); WINPR_ASSERT(pEntryPoints->GetPlugin); - AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*)pEntryPoints->GetPlugin(pEntryPoints, "audin"); + AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*)pEntryPoints->GetPlugin(pEntryPoints, AUDIN_CHANNEL_NAME); if (audin != NULL) return CHANNEL_RC_ALREADY_INITIALIZED; @@ -1098,7 +1099,7 @@ FREERDP_ENTRY_POINT(UINT audin_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoint goto out; } - error = pEntryPoints->RegisterPlugin(pEntryPoints, "audin", &audin->iface); + error = pEntryPoints->RegisterPlugin(pEntryPoints, AUDIN_CHANNEL_NAME, &audin->iface); if (error == CHANNEL_RC_OK) return error; diff --git a/client/common/cmdline.c b/client/common/cmdline.c index b59e8ac35..9584fcad1 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -54,6 +54,9 @@ #include #endif +#include +#include + #include #include #include @@ -1018,7 +1021,7 @@ static int freerdp_client_command_line_post_filter(void* context, COMMAND_LINE_A CommandLineSwitchCase(arg, "microphone") { size_t count; - ptr.p = CommandLineParseCommaSeparatedValuesEx("audin", arg->Value, &count); + ptr.p = CommandLineParseCommaSeparatedValuesEx(AUDIN_CHANNEL_NAME, arg->Value, &count); status = freerdp_client_add_dynamic_channel(settings, count, ptr.pc); free(ptr.p); } @@ -4893,19 +4896,17 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings) #if defined(CHANNEL_AINPUT_CLIENT) { 0, AINPUT_CHANNEL_NAME, NULL }, /* always loaded */ #endif - { FreeRDP_AudioCapture, "audin", NULL }, + { FreeRDP_AudioCapture, AUDIN_CHANNEL_NAME, NULL }, { FreeRDP_AudioPlayback, RDPSND_CHANNEL_NAME, NULL }, #ifdef CHANNEL_RDPEI_CLIENT - { FreeRDP_MultiTouchInput, "rdpei", NULL }, + { FreeRDP_MultiTouchInput, RDPEI_CHANNEL_NAME, NULL }, #endif - { FreeRDP_SupportGraphicsPipeline, "rdpgfx", NULL }, - { FreeRDP_SupportEchoChannel, "echo", NULL }, + { FreeRDP_SupportGraphicsPipeline, RDPGFX_CHANNEL_NAME, NULL }, + { FreeRDP_SupportEchoChannel, ECHO_CHANNEL_NAME, NULL }, { FreeRDP_SupportSSHAgentChannel, "sshagent", NULL }, { FreeRDP_SupportDisplayControl, DISP_CHANNEL_NAME, NULL }, - { FreeRDP_SupportGeometryTracking, "geometry", NULL }, - { FreeRDP_SupportSSHAgentChannel, "sshagent", NULL }, - { FreeRDP_SupportSSHAgentChannel, "sshagent", NULL }, - { FreeRDP_SupportVideoOptimized, "video", NULL }, + { FreeRDP_SupportGeometryTracking, GEOMETRY_CHANNEL_NAME, NULL }, + { FreeRDP_SupportVideoOptimized, VIDEO_CHANNEL_NAME, NULL }, }; ChannelToLoad staticChannels[] = { @@ -4948,7 +4949,7 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings) settings->AudioPlayback = TRUE; /* Both rdpsnd and tsmf require this flag to be set */ } - if (freerdp_dynamic_channel_collection_find(settings, "audin")) + if (freerdp_dynamic_channel_collection_find(settings, AUDIN_CHANNEL_NAME)) { settings->AudioCapture = TRUE; } diff --git a/include/freerdp/channels/audin.h b/include/freerdp/channels/audin.h index b42aed1e5..17254e650 100644 --- a/include/freerdp/channels/audin.h +++ b/include/freerdp/channels/audin.h @@ -26,6 +26,7 @@ #include #include +#define AUDIN_CHANNEL_NAME "audin" #define AUDIN_DVC_CHANNEL_NAME "AUDIO_INPUT" typedef struct diff --git a/include/freerdp/channels/cliprdr.h b/include/freerdp/channels/cliprdr.h index cb4171802..297a9774d 100644 --- a/include/freerdp/channels/cliprdr.h +++ b/include/freerdp/channels/cliprdr.h @@ -26,6 +26,7 @@ #include +#define CLIPRDR_CHANNEL_NAME "cliprdr" #define CLIPRDR_SVC_CHANNEL_NAME "cliprdr" /* CLIPRDR_HEADER.msgType */ diff --git a/include/freerdp/channels/drdynvc.h b/include/freerdp/channels/drdynvc.h index 885fa01aa..5afc3b2aa 100644 --- a/include/freerdp/channels/drdynvc.h +++ b/include/freerdp/channels/drdynvc.h @@ -25,6 +25,7 @@ #include #include +#define DRDYNVC_CHANNEL_NAME "drdynvc" #define DRDYNVC_SVC_CHANNEL_NAME "drdynvc" #ifdef __cplusplus diff --git a/include/freerdp/channels/echo.h b/include/freerdp/channels/echo.h index aca56cc49..263de658a 100644 --- a/include/freerdp/channels/echo.h +++ b/include/freerdp/channels/echo.h @@ -25,6 +25,7 @@ #include #include +#define ECHO_CHANNEL_NAME "echo" #define ECHO_DVC_CHANNEL_NAME "ECHO" #ifdef __cplusplus diff --git a/include/freerdp/channels/encomsp.h b/include/freerdp/channels/encomsp.h index d8d2cdd27..7fde7738e 100644 --- a/include/freerdp/channels/encomsp.h +++ b/include/freerdp/channels/encomsp.h @@ -28,6 +28,7 @@ extern "C" { #endif +#define ENCOMSP_CHANNEL_NAME "encomsp" #define ENCOMSP_SVC_CHANNEL_NAME "encomsp" typedef struct diff --git a/include/freerdp/channels/geometry.h b/include/freerdp/channels/geometry.h index f7b95875d..1b00f0ffa 100644 --- a/include/freerdp/channels/geometry.h +++ b/include/freerdp/channels/geometry.h @@ -23,6 +23,7 @@ #include #include +#define GEOMETRY_CHANNEL_NAME "geometry" #define GEOMETRY_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Geometry::v08.01" #ifdef __cplusplus diff --git a/include/freerdp/channels/rdpdr.h b/include/freerdp/channels/rdpdr.h index b69697226..6315ab7b9 100644 --- a/include/freerdp/channels/rdpdr.h +++ b/include/freerdp/channels/rdpdr.h @@ -42,6 +42,7 @@ extern "C" { #endif +#define RDPDR_CHANNEL_NAME "rdpdr" #define RDPDR_SVC_CHANNEL_NAME "rdpdr" #define RDPDR_DEVICE_IO_REQUEST_LENGTH 24 diff --git a/include/freerdp/channels/rdpecam.h b/include/freerdp/channels/rdpecam.h index 856f5eb2e..2e41efcd4 100644 --- a/include/freerdp/channels/rdpecam.h +++ b/include/freerdp/channels/rdpecam.h @@ -24,6 +24,7 @@ #include #include +#define RDPECAM_CHANNEL_NAME "rdpecam" #define RDPECAM_DVC_CHANNEL_NAME "rdpecam" #define RDPECAM_CONTROL_DVC_CHANNEL_NAME "RDCamera_Device_Enumerator" diff --git a/include/freerdp/channels/rdpei.h b/include/freerdp/channels/rdpei.h index 14c2b69ee..1c4fca5de 100644 --- a/include/freerdp/channels/rdpei.h +++ b/include/freerdp/channels/rdpei.h @@ -31,6 +31,7 @@ extern "C" #define RDPINPUT_HEADER_LENGTH 6 +#define RDPEI_CHANNEL_NAME "rdpei" #define RDPEI_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Input" /** @brief protocol version */ diff --git a/include/freerdp/channels/rdpemsc.h b/include/freerdp/channels/rdpemsc.h index 38ab688a4..1c90362bc 100644 --- a/include/freerdp/channels/rdpemsc.h +++ b/include/freerdp/channels/rdpemsc.h @@ -24,6 +24,7 @@ #include #include +#define RDPEMSC_CHANNEL_NAME "mousecursor" #define RDPEMSC_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::MouseCursor" #ifdef __cplusplus diff --git a/include/freerdp/channels/rdpewa.h b/include/freerdp/channels/rdpewa.h index 9348c7a8a..a056f9d2c 100644 --- a/include/freerdp/channels/rdpewa.h +++ b/include/freerdp/channels/rdpewa.h @@ -25,6 +25,7 @@ #include #include +#define RDPEWA_CHANNEL_NAME "rdpewa" #define RDPEWA_DVC_CHANNEL_NAME "rdpewa" #ifdef __cplusplus diff --git a/include/freerdp/channels/rdpgfx.h b/include/freerdp/channels/rdpgfx.h index 4e72ec1c7..b608e0fef 100644 --- a/include/freerdp/channels/rdpgfx.h +++ b/include/freerdp/channels/rdpgfx.h @@ -24,6 +24,7 @@ #include #include +#define RDPGFX_CHANNEL_NAME "rdpgfx" #define RDPGFX_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Graphics" #ifdef __cplusplus diff --git a/include/freerdp/channels/remdesk.h b/include/freerdp/channels/remdesk.h index 45a8a4525..281317a7d 100644 --- a/include/freerdp/channels/remdesk.h +++ b/include/freerdp/channels/remdesk.h @@ -28,6 +28,7 @@ extern "C" { #endif +#define REMDESK_CHANNEL_NAME "remdesk" #define REMDESK_SVC_CHANNEL_NAME "remdesk" #define REMDESK_ERROR_NOERROR 0 diff --git a/include/freerdp/channels/telemetry.h b/include/freerdp/channels/telemetry.h index b4764d949..cf96d6ddf 100644 --- a/include/freerdp/channels/telemetry.h +++ b/include/freerdp/channels/telemetry.h @@ -24,6 +24,7 @@ #include #include +#define TELEMETRY_CHANNEL_NAME "telemetry" #define TELEMETRY_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Telemetry" #ifdef __cplusplus diff --git a/include/freerdp/channels/tsmf.h b/include/freerdp/channels/tsmf.h index 2e5250931..aa943c9a0 100644 --- a/include/freerdp/channels/tsmf.h +++ b/include/freerdp/channels/tsmf.h @@ -30,6 +30,7 @@ #include +#define TSMF_CHANNEL_NAME "tsmf" #define TSMF_DVC_CHANNEL_NAME "TSMF" #endif /* FREERDP_CHANNEL_TSMF_H */ diff --git a/include/freerdp/channels/urbdrc.h b/include/freerdp/channels/urbdrc.h index a0035169a..f3d918da6 100644 --- a/include/freerdp/channels/urbdrc.h +++ b/include/freerdp/channels/urbdrc.h @@ -26,5 +26,6 @@ #include #define URBDRC_CHANNEL_NAME "urbdrc" +#define URBDRC_DVC_CHANNEL_NAME "urbdrc" #endif /* FREERDP_CHANNEL_URBDRC_H */ diff --git a/include/freerdp/channels/video.h b/include/freerdp/channels/video.h index ec46733c3..b552475ba 100644 --- a/include/freerdp/channels/video.h +++ b/include/freerdp/channels/video.h @@ -23,6 +23,7 @@ #include #include +#define VIDEO_CHANNEL_NAME "video" #define VIDEO_CONTROL_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Video::Control::v08.01" #define VIDEO_DATA_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Video::Data::v08.01"