BOOL CPlugin::RequestAPIs( void ) { if (AddAPI(PLUGIN_API_CMDPROC,"Alias Processor",sizeof(PluginCmdProcTable)) && //AddAPI(99999,NULL,10,PLUGIN_REQUIRES,&__BASICTABLENAME) && // API 99999 doesn't exist, enable to do a core resolve check! AddAPI(PLUGIN_API_BASIC,NULL,sizeof(PluginBasicTable),PLUGIN_REQUIRES,&__BASICTABLENAME)) return TRUE; else return FALSE; }
bool CSynapseClient::ConfigXML( CSynapseServer *pServer, const char *client_name, const XMLConfigEntry_t entries[] ) { if ( !client_name ) { client_name = GetName(); } Syn_Printf( "Dynamic APIs for client '%s'\n", GetInfo() ); if ( !pServer->SelectClientConfig( client_name ) ) { Syn_Printf( "Failed to select synapse client config '%s'\n", client_name ); return false; } int i = 0; while ( entries[i].type != SYN_UNKNOWN ) { // don't test pTable, for a SYN_PROVIDE it will be empty char *minor; if ( !pServer->GetConfigForAPI( entries[i].api, &minor ) ) { Syn_Printf( "GetConfigForAPI '%s' failed - invalid XML config file?\n", entries[i].api ); return false; } AddAPI( entries[i].api, minor, entries[i].size, entries[i].type, entries[i].pTable ); i++; } Syn_Printf( "%d dynamic interfaces parsed for '%s'\n", i, client_name ); return true; }