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);
 
   39static 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)
 
   67void shadow_subsystem_set_entry_builtin(
const char* name)
 
   69  pfnShadowSubsystemEntry entry = shadow_subsystem_load_static_entry(name);
 
   72    shadow_subsystem_set_entry(entry);