19 #include <freerdp/config.h>
21 #include <freerdp/server/shadow.h>
25 const char* (*name)(void);
26 pfnShadowSubsystemEntry entry;
27 } RDP_SHADOW_SUBSYSTEM;
29 extern int ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints);
30 extern const char* ShadowSubsystemName(
void);
32 static RDP_SHADOW_SUBSYSTEM g_Subsystems[] = {
34 { ShadowSubsystemName, ShadowSubsystemEntry }
37 static size_t g_SubsystemCount = ARRAYSIZE(g_Subsystems);
39 static pfnShadowSubsystemEntry shadow_subsystem_load_static_entry(
const char* name)
43 if (g_SubsystemCount > 0)
45 const RDP_SHADOW_SUBSYSTEM* cur = &g_Subsystems[0];
46 WINPR_ASSERT(cur->entry);
54 for (
size_t index = 0; index < g_SubsystemCount; index++)
56 const RDP_SHADOW_SUBSYSTEM* cur = &g_Subsystems[index];
57 WINPR_ASSERT(cur->name);
58 WINPR_ASSERT(cur->entry);
60 if (strcmp(name, cur->name()) == 0)
67 void shadow_subsystem_set_entry_builtin(
const char* name)
69 pfnShadowSubsystemEntry entry = shadow_subsystem_load_static_entry(name);
72 shadow_subsystem_set_entry(entry);