Beispiel #1
0
void SjCInterface::LoadModulesFastHack(SjModuleList& list, const wxArrayString& possibleDlls)
{
	size_t                  i, iCount = possibleDlls.GetCount();
	wxDynamicLibrary*       dynlib;
	dllMainEntryFuncType    entryPoint;
	SjInterface*            cinterf;
	for( i = 0; i < iCount; i++ )
	{
		// load a DLL
		{
			wxLogNull null;

			dynlib = new wxDynamicLibrary(possibleDlls[i]);
			if( dynlib == NULL )
				continue; // nothing to log - this is no SjDll

			if( !dynlib->IsLoaded() )
			{
				delete dynlib;
				continue; // nothing to log - this is no SjDll
			}

			entryPoint = (dllMainEntryFuncType)dynlib->GetSymbol(wxT("SjGetInterface"));
			if( entryPoint == NULL )
			{
				delete dynlib;
				continue; // nothing to log - this is no SjDll
			}
		}

		wxLogInfo(wxT("Loading %s"), possibleDlls.Item(i).c_str());

		cinterf = entryPoint();
		if( cinterf == NULL || cinterf->CallPlugin == NULL )
		{
			wxLogError(wxT("SjGetInterface returns 0 or CallPlugin set to 0."));
			wxLogError(_("Cannot open \"%s\"."), possibleDlls.Item(i).c_str());
			delete dynlib;
			continue; // error
		}

		// success so far - create the plugin and add it to the list
		list.Append(new SjCPlugin(this, possibleDlls[i], dynlib, cinterf));
	}
}
void SjInternalInterface::LoadModules(SjModuleList& list)
{
	// add COMMON modules
	list.Append   (new SjSettingsModule           (this));
	list.Append   (new SjTagEditorModule          (this));
	list.Append   (new SjOpenFilesModule          (this));
	list.Append   (new SjMyMusicModule            (this));
	list.Append   (new SjBasicSettingsModule      (this));
	list.Append   (new SjPlaybackSettingsModule   (this));
	list.Append   (new SjViewSettingsModule       (this));
	list.Append   (new SjHelpModule               (this));
	list.Append   (new SjArtEditorModule          (this));
	list.Append   (new SjAccelModule              (this));
	list.Append   (new SjKioskModule              (this));
	list.Append   (new SjAdvSearchModule          (this));
	list.Append   (new SjVirtKeybdModule          (this));

	// add MLR modules
	list.Append   (new SjFolderScannerModule      (this));
	list.Append   (new SjServerScannerModule      (this));

	// add COL modules
	list.Append   (new SjLibraryModule            (this));

	// add PLAYER and VIS modules
	list.Append   (new SjPlayerModule             (this));
	list.Append   (new SjVisModule                (this));
	list.Append   (new SjOscModule                (this));
	list.Append   (new SjKaraokeModule            (this));
	#if SJ_USE_VIDEO
	list.Append   (new SjVidoutModule             (this));
	#endif
}