101 // CHsContentControlFactory::~CHsContentControlFactory() |
101 // CHsContentControlFactory::~CHsContentControlFactory() |
102 // ---------------------------------------------------------------------------- |
102 // ---------------------------------------------------------------------------- |
103 // |
103 // |
104 EXPORT_C CHsContentControlFactory::~CHsContentControlFactory() |
104 EXPORT_C CHsContentControlFactory::~CHsContentControlFactory() |
105 { |
105 { |
|
106 delete iHsContentControlEComListener; |
|
107 delete iHsContentControlUninstallMonitor; |
|
108 |
106 iImplArray.ResetAndDestroy(); |
109 iImplArray.ResetAndDestroy(); |
107 iImplArray.Close(); |
110 iImplArray.Close(); |
108 |
111 |
109 if ( iHsContentControlUis.Count() > 0 ) |
|
110 { |
|
111 for( TInt index( iHsContentControlUis.Count() - 1 ); index >= 0; --index ) |
|
112 { |
|
113 CHsContentControlUi* cc( iHsContentControlUis[ index ] ); |
|
114 ReleaseHsCcUi( cc ); |
|
115 } |
|
116 } |
|
117 |
|
118 iHsContentControlUis.ResetAndDestroy(); |
112 iHsContentControlUis.ResetAndDestroy(); |
119 |
|
120 delete iHsContentControlEComListener; |
|
121 delete iHsContentControlUninstallMonitor; |
|
122 } |
113 } |
123 |
114 |
124 // --------------------------------------------------------------------------------- |
115 // --------------------------------------------------------------------------------- |
125 // CHsContentControlFactory::GetHsContentController() |
116 // CHsContentControlFactory::GetHsContentController() |
126 // --------------------------------------------------------------------------------- |
117 // --------------------------------------------------------------------------------- |
127 // |
118 // |
128 EXPORT_C MHsContentControlUi* CHsContentControlFactory::GetHsContentController( |
119 EXPORT_C MHsContentControlUi* CHsContentControlFactory::GetHsContentController( |
129 const TDesC8& aControlType ) |
120 const TDesC8& aControlType ) |
130 { |
121 { |
131 MHsContentControlUi* retval( FindHsContentController( aControlType ) ); |
122 MHsContentControlUi* retval( FindHsContentController( aControlType ) ); |
132 |
123 |
133 if ( !retval ) |
124 if ( !retval ) |
134 { |
125 { |
165 } |
156 } |
166 |
157 |
167 return retval; |
158 return retval; |
168 } |
159 } |
169 |
160 |
|
161 // --------------------------------------------------------------------------------- |
|
162 // CHsContentControlFactory::PrepareToExit() |
|
163 // --------------------------------------------------------------------------------- |
|
164 // |
|
165 EXPORT_C void CHsContentControlFactory::PrepareToExit() |
|
166 { |
|
167 if ( iHsContentControlUis.Count() > 0 ) |
|
168 { |
|
169 for( TInt index( iHsContentControlUis.Count() - 1 ); index >= 0; --index ) |
|
170 { |
|
171 CHsContentControlUi* cc( iHsContentControlUis[ index ] ); |
|
172 ReleaseHsCcUi( cc ); |
|
173 } |
|
174 } |
|
175 } |
|
176 |
170 // ---------------------------------------------------------------------------- |
177 // ---------------------------------------------------------------------------- |
171 // CHsContentControlFactory::FindHsContentController() |
178 // CHsContentControlFactory::FindHsContentController() |
172 // ---------------------------------------------------------------------------- |
179 // ---------------------------------------------------------------------------- |
173 // |
180 // |
174 MHsContentControlUi* CHsContentControlFactory::FindHsContentController( |
181 MHsContentControlUi* CHsContentControlFactory::FindHsContentController( |
243 TBool done( EFalse ); |
250 TBool done( EFalse ); |
244 |
251 |
245 // If an implementation is not present in present in the plugInArray then its removed. |
252 // If an implementation is not present in present in the plugInArray then its removed. |
246 for( TInt index( iImplArray.Count() - 1 ); index >= 0 && !done; --index ) |
253 for( TInt index( iImplArray.Count() - 1 ); index >= 0 && !done; --index ) |
247 { |
254 { |
248 uid = plugInArray[ index ]->ImplementationUid(); |
255 uid = iImplArray[ index ]->ImplementationUid(); |
249 CImplementationInformation* implInfo = |
256 CImplementationInformation* implInfo = |
250 FindPluginImplInfo( uid, plugInArray ); |
257 FindPluginImplInfo( uid, plugInArray ); |
251 if ( implInfo && PluginUpgradeDowngrade( *implInfo ) ) |
258 if ( implInfo && PluginUpgradeDowngrade( *implInfo ) ) |
252 { |
259 { |
253 done = ETrue; |
260 done = ETrue; |