225 // --------------------------------------------------------------------------- |
225 // --------------------------------------------------------------------------- |
226 // |
226 // |
227 CAlfStreamerServer::~CAlfStreamerServer() |
227 CAlfStreamerServer::~CAlfStreamerServer() |
228 { |
228 { |
229 delete iThemesListener; |
229 delete iThemesListener; |
|
230 delete iWindowMgr; |
230 delete iWindowHierarcy; |
231 delete iWindowHierarcy; |
231 iWindowHierarcy = NULL; |
|
232 iCompositionSessions.Close(); |
232 iCompositionSessions.Close(); |
233 iCompositionHostSessions.Close(); |
233 iCompositionHostSessions.Close(); |
234 iCompositionTokens.Close(); |
234 iCompositionTokens.Close(); |
235 iWindowServerSessions.Close(); |
235 iWindowServerSessions.Close(); |
236 iAlfTargets.Close(); |
236 iAlfTargets.Close(); |
237 iOptionalGRAM.Close(); |
237 iOptionalGRAM.Close(); |
238 iSignals.Close(); |
|
239 // Remove "effectpluginnotunloaded" from 10282CAF.rss in order to really unload effect plugin |
|
240 // iWindowMgr->DestroyPlugin(TUid::Uid(0x2001e2cf)); // effects plugin. window manager needed for unloading. |
|
241 delete iWindowMgr; |
|
242 iWindowMgr = NULL; |
|
243 } |
238 } |
244 |
239 |
245 void CAlfStreamerServer::AppendCompositionSessionL(CAlfStreamerServerSession* aSession, TBool aHost) |
240 void CAlfStreamerServer::AppendCompositionSessionL(CAlfStreamerServerSession* aSession, TBool aHost) |
246 { |
241 { |
247 if(!aHost) |
242 if(!aHost) |
800 CAlfStreamerServerSession::~CAlfStreamerServerSession() |
795 CAlfStreamerServerSession::~CAlfStreamerServerSession() |
801 { |
796 { |
802 TInt i = 0; |
797 TInt i = 0; |
803 RImplInfoPtrArray pluginArray; |
798 RImplInfoPtrArray pluginArray; |
804 REComSession::ListImplementationsL( KAlfGfxPluginInterfaceUId, pluginArray ); |
799 REComSession::ListImplementationsL( KAlfGfxPluginInterfaceUId, pluginArray ); |
805 CAlfWindowManager* windowMgr = NULL; |
|
806 if (Server()) |
|
807 { |
|
808 windowMgr = ((CAlfStreamerServer*)(Server()))->WindowMgr(); |
|
809 } |
|
810 |
|
811 for ( i = iLoadedPlugins.Count() - 1; i >= 0; i-- ) |
800 for ( i = iLoadedPlugins.Count() - 1; i >= 0; i-- ) |
812 { |
801 { |
813 TInt j = 0; |
802 TInt j = 0; |
814 for ( j= 0; j < pluginArray.Count(); j++ ) |
803 for ( j= 0; j < pluginArray.Count(); j++ ) |
815 { |
804 { |
816 TUid loaded = TUid::Uid(iLoadedPlugins[i]); |
805 TUid loaded = TUid::Uid(iLoadedPlugins[i]); |
817 TUid listed = pluginArray[j]->ImplementationUid(); |
806 TUid listed = pluginArray[j]->ImplementationUid(); |
818 TPtrC8 listedopaque = pluginArray[j]->OpaqueData(); |
807 TPtrC8 listedopaque = pluginArray[j]->OpaqueData(); |
819 if ( loaded == listed && ( (listedopaque.CompareF( KAlfDoNotUnloadPlugin )) != 0 ) && windowMgr) |
808 if ( loaded == listed && ( (listedopaque.CompareF( KAlfDoNotUnloadPlugin )) != 0 ) ) |
820 { |
809 { |
821 windowMgr->DestroyPlugin(TUid::Uid(iLoadedPlugins[i])); |
810 ((CAlfStreamerServer*)(Server()))->WindowMgr()->DestroyPlugin(TUid::Uid(iLoadedPlugins[i])); |
822 } |
811 } |
823 } |
812 } |
824 } |
813 } |
825 // Clear the data in plugin array |
814 // Clear the data in plugin array |
826 for (TInt i = pluginArray.Count() - 1; i >= 0; i-- ) |
815 for (TInt i = pluginArray.Count() - 1; i >= 0; i-- ) |