[channels] add <NAME>_CHANNEL_NAME for each
* made <NAME>_CHANNEL_NAME defines consistent, each channel now has a define for the library name. * use these defines instead of string constants
This commit is contained in:
parent
e622e26c70
commit
d000d9e957
@ -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;
|
||||
|
||||
|
@ -54,6 +54,9 @@
|
||||
#include <freerdp/channels/ainput.h>
|
||||
#endif
|
||||
|
||||
#include <freerdp/channels/audin.h>
|
||||
#include <freerdp/channels/echo.h>
|
||||
|
||||
#include <freerdp/client/cmdline.h>
|
||||
#include <freerdp/version.h>
|
||||
#include <freerdp/client/utils/smartcard_cli.h>
|
||||
@ -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;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <freerdp/dvc.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define AUDIN_CHANNEL_NAME "audin"
|
||||
#define AUDIN_DVC_CHANNEL_NAME "AUDIO_INPUT"
|
||||
|
||||
typedef struct
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include <winpr/shell.h>
|
||||
|
||||
#define CLIPRDR_CHANNEL_NAME "cliprdr"
|
||||
#define CLIPRDR_SVC_CHANNEL_NAME "cliprdr"
|
||||
|
||||
/* CLIPRDR_HEADER.msgType */
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <freerdp/dvc.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define DRDYNVC_CHANNEL_NAME "drdynvc"
|
||||
#define DRDYNVC_SVC_CHANNEL_NAME "drdynvc"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <freerdp/dvc.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define ECHO_CHANNEL_NAME "echo"
|
||||
#define ECHO_DVC_CHANNEL_NAME "ECHO"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -28,6 +28,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#define ENCOMSP_CHANNEL_NAME "encomsp"
|
||||
#define ENCOMSP_SVC_CHANNEL_NAME "encomsp"
|
||||
|
||||
typedef struct
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <winpr/wtypes.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define GEOMETRY_CHANNEL_NAME "geometry"
|
||||
#define GEOMETRY_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Geometry::v08.01"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -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
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <freerdp/dvc.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define RDPECAM_CHANNEL_NAME "rdpecam"
|
||||
#define RDPECAM_DVC_CHANNEL_NAME "rdpecam"
|
||||
#define RDPECAM_CONTROL_DVC_CHANNEL_NAME "RDCamera_Device_Enumerator"
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <freerdp/dvc.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define RDPEMSC_CHANNEL_NAME "mousecursor"
|
||||
#define RDPEMSC_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::MouseCursor"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <freerdp/dvc.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define RDPEWA_CHANNEL_NAME "rdpewa"
|
||||
#define RDPEWA_DVC_CHANNEL_NAME "rdpewa"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <freerdp/dvc.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define RDPGFX_CHANNEL_NAME "rdpgfx"
|
||||
#define RDPGFX_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Graphics"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -28,6 +28,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#define REMDESK_CHANNEL_NAME "remdesk"
|
||||
#define REMDESK_SVC_CHANNEL_NAME "remdesk"
|
||||
|
||||
#define REMDESK_ERROR_NOERROR 0
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <freerdp/dvc.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define TELEMETRY_CHANNEL_NAME "telemetry"
|
||||
#define TELEMETRY_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Telemetry"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define TSMF_CHANNEL_NAME "tsmf"
|
||||
#define TSMF_DVC_CHANNEL_NAME "TSMF"
|
||||
|
||||
#endif /* FREERDP_CHANNEL_TSMF_H */
|
||||
|
@ -26,5 +26,6 @@
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#define URBDRC_CHANNEL_NAME "urbdrc"
|
||||
#define URBDRC_DVC_CHANNEL_NAME "urbdrc"
|
||||
|
||||
#endif /* FREERDP_CHANNEL_URBDRC_H */
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <winpr/wtypes.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user