Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

void PPluginManager::AddNotifier ( const PNotifier filterFunction,
BOOL  existing = FALSE 
)

Add a notifier to the plugin manager. The call back function is executed just after loading, or just after unloading, a plugin.

To use define: PDECLARE_NOTIFIER(PDynaLink, YourClass, YourFunction); and void YourClass::YourFunction(PDynaLink & dll, INT code) { code == 0 means loading code == 1 means unloading } and to connect to the plugin manager: PPluginManager & mgr = PPluginManager::GetPluginManager(); mgr->AddNotifier((PCREATE_NOTIFIER(YourFunction));

Definition at line 381 of file pluginmgr.cxx.

{
  PWaitAndSignal m(notifierMutex);
  notifierList.Append(new PNotifier(notifyFunction));

  if (existing)
    for (PINDEX i = 0; i < pluginList.GetSize(); i++) 
      CallNotifier(pluginList[i], 0);
}

Generated by  Doxygen 1.6.0   Back to index