19#include <freerdp/config.h>
21#include <freerdp/server/shadow.h>
25 const char* (*name)(void);
26 pfnShadowSubsystemEntry entry;
27} RDP_SHADOW_SUBSYSTEM;
29extern int ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints);
30extern const char* ShadowSubsystemName(
void);
32static const RDP_SHADOW_SUBSYSTEM g_Subsystems[] = {
34 { ShadowSubsystemName, ShadowSubsystemEntry }
37static const size_t g_SubsystemCount = ARRAYSIZE(g_Subsystems);
40static pfnShadowSubsystemEntry shadow_subsystem_load_static_entry(
const char* name)
44 if (g_SubsystemCount > 0)
46 const RDP_SHADOW_SUBSYSTEM* cur = &g_Subsystems[0];
47 WINPR_ASSERT(cur->entry);
55 for (
size_t index = 0; index < g_SubsystemCount; index++)
57 const RDP_SHADOW_SUBSYSTEM* cur = &g_Subsystems[index];
58 WINPR_ASSERT(cur->name);
59 WINPR_ASSERT(cur->entry);
61 if (strcmp(name, cur->name()) == 0)
68void shadow_subsystem_set_entry_builtin(
const char* name)
70 pfnShadowSubsystemEntry entry = shadow_subsystem_load_static_entry(name);
73 shadow_subsystem_set_entry(entry);