140 CleanupStack::PopAndDestroy( array ); |
140 CleanupStack::PopAndDestroy( array ); |
141 return interfaceArray; |
141 return interfaceArray; |
142 } |
142 } |
143 |
143 |
144 // ----------------------------------------------------------------------------- |
144 // ----------------------------------------------------------------------------- |
145 // CXnUiEngine::FindNodeByClassL |
145 // CXnUiEngine::FindContentSourceNodesL |
146 // Forwards the call to the ui engine implementation |
146 // Forwards the call to the ui engine implementation |
147 // ----------------------------------------------------------------------------- |
147 // ----------------------------------------------------------------------------- |
148 // |
148 // |
149 EXPORT_C RPointerArray< CXnNodeAppIf > TXnUiEngineAppIf::FindContentSourceNodesL( |
149 EXPORT_C RPointerArray< CXnNodeAppIf > TXnUiEngineAppIf::FindContentSourceNodesL( |
150 const TDesC8& aNamespace ) |
150 const TDesC8& aNamespace ) |
151 { |
151 { |
|
152 CXnPointerArray* array = iUiEngine->FindContentSourceNodesL( aNamespace ); |
|
153 CleanupStack::PushL( array ); |
|
154 |
152 RPointerArray< CXnNodeAppIf > interfaceArray; |
155 RPointerArray< CXnNodeAppIf > interfaceArray; |
153 CleanupClosePushL( interfaceArray ); |
156 CleanupClosePushL( interfaceArray ); |
154 |
157 |
155 CXnViewManager* manager( iUiEngine->ViewManager() ); |
158 const TInt count = array->Container().Count(); |
156 |
159 interfaceArray.ReserveL( count ); |
157 CXnPluginData* data( manager->ActiveViewData().Plugin( aNamespace ) ); |
160 |
158 |
161 for ( TInt i = 0; i < count; i++ ) |
159 if ( data ) |
162 { |
160 { |
163 CXnNode* node = static_cast< CXnNode* >( array->Container()[i] ); |
161 RPointerArray< CXnNode > nodes; |
164 // Append cannot fail because ReserveL call before this loop has |
162 CleanupClosePushL( nodes ); |
165 // allocated the array buffer |
163 |
166 interfaceArray.Append( &( node->AppIfL() ) ); |
164 data->ContentSourceNodesL( nodes ); |
167 } |
165 |
168 |
166 for ( TInt i = 0; i < nodes.Count(); i++ ) |
|
167 { |
|
168 interfaceArray.AppendL( &nodes[i]->AppIfL() ); |
|
169 } |
|
170 |
|
171 CleanupStack::PopAndDestroy( &nodes ); |
|
172 } |
|
173 |
|
174 CleanupStack::Pop( &interfaceArray ); |
169 CleanupStack::Pop( &interfaceArray ); |
175 |
170 CleanupStack::PopAndDestroy( array ); |
176 return interfaceArray; |
171 return interfaceArray; |
177 } |
172 } |
178 |
173 |
179 // ----------------------------------------------------------------------------- |
174 // ----------------------------------------------------------------------------- |
180 // TXnUiEngineAppIf::RenderUIL |
175 // TXnUiEngineAppIf::RenderUIL |
181 // Forwards the call to the ui engine implementation |
176 // Forwards the call to the ui engine implementation |