STDMETHODIMP USTelemedScanConverterPlugin::SetScanConverterPlugin(IDispatch* plugin) { // make sure that there is no scan converter plugin registered already ReleasePlugin(); HRESULT hr; if (plugin == NULL) { MITK_WARN("IUsgfwScanConverterPluginCB")("ScanConverterPlugin") << "Plugin must not be NULL when calling SetScanConverterPlugin."; return S_FALSE; } // get Telemed API plugin from the COM library Usgfw2Lib::IUsgScanConverterPlugin* tmp_plugin; hr = plugin->QueryInterface(__uuidof(Usgfw2Lib::IUsgScanConverterPlugin), (void**)&tmp_plugin); if (FAILED(hr)) { MITK_WARN("IUsgfwScanConverterPluginCB")("ScanConverterPlugin") << "Could not query com interface for IUsgScanConverterPlugin (" << hr << ")."; return hr; } // get the converter for scan lines from the COM library and // save it as a member attribute hr = tmp_plugin->get_ScanConverter((IUnknown**)&m_Plugin); if (FAILED(hr)) { MITK_WARN("IUsgfwScanConverterPluginCB")("ScanConverterPlugin") << "Could not get ScanConverter from plugin (" << hr << ")."; return hr; } SAFE_RELEASE(tmp_plugin); // now the callback can be set -> interface functions of this // object will be called from now on when new image data is // available hr = m_Plugin->SetCallback(this,USPC_BUFFER_INTERIM_OUTPUT); if (FAILED(hr)) { MITK_WARN("IUsgfwScanConverterPluginCB")("ScanConverterPlugin") << "Could not set callback for plugin (" << hr << ")."; return hr; } return S_OK; }
void CBgAnimHost::SkinConfigurationChanged( const TAknsSkinStatusConfigurationChangeReason aReason ) { if (aReason == EAknsSkinStatusConfigurationDeployed && iPlugin) { // okay, the skin has changed, let's check that should we load a different // animation plugin TBool changed = EFalse; TRAPD(err, changed = GetPluginConfigurationL()); if (err || !changed) { // plugin configuration has not changed, or there is not animation // in the theme, just return return; } CompositionTargetHidden(); ReleasePlugin(); TRAP_IGNORE(LoadPluginL()); CompositionTargetVisible(); } }
CBgAnimHost::~CBgAnimHost() { iSkinSrv.Close(); delete iCurrentPluginDllName; delete iCurrentPluginAssetDir; delete iTimer; delete iTheReaper; delete iDoomBringer; ReleasePlugin(); #if !defined(SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS) delete iSCPropertyListener; #endif delete iHSFgStatusPropertyListener; delete iThemeRepositoryListener; iSensorListeners.Close(); delete CActiveScheduler::Current(); CActiveScheduler::Install(NULL); ReleaseWindowSurface(); ReleaseEGL(); DestroyWindow(); }
USTelemedScanConverterPlugin::~USTelemedScanConverterPlugin( ) { ReleasePlugin(); }