equal
deleted
inserted
replaced
134 { |
134 { |
135 TRACER("CGlxCache::MediaUpdatedL"); |
135 TRACER("CGlxCache::MediaUpdatedL"); |
136 |
136 |
137 if (aMedia.IsSupported(KMPXMediaArrayContents)) |
137 if (aMedia.IsSupported(KMPXMediaArrayContents)) |
138 { |
138 { |
139 CMPXMediaArray* mediaArray = aMedia.ValueCObjectL<CMPXMediaArray>(KMPXMediaArrayContents); |
139 #ifdef _DEBUG |
|
140 TTime startTime; |
|
141 startTime.HomeTime(); |
|
142 #endif |
|
143 CMPXMediaArray* mediaArray = aMedia.ValueCObjectL<CMPXMediaArray> ( |
|
144 KMPXMediaArrayContents); |
140 CleanupStack::PushL(mediaArray); |
145 CleanupStack::PushL(mediaArray); |
141 |
146 |
142 TInt arrayCount = mediaArray->Count(); |
147 TInt arrayCount = mediaArray->Count(); |
143 GLX_DEBUG2("CGlxCache::MediaUpdatedL() arrayCount=%d", arrayCount); |
148 GLX_DEBUG2("CGlxCache::MediaUpdatedL() arrayCount=%d", arrayCount); |
144 for (TInt count = 0; count < arrayCount; ++count) |
149 for (TInt count = 0; count < arrayCount; ++count) |
145 { |
150 { |
146 UpdateMediaL(*((*mediaArray)[count])); |
151 UpdateMediaL(*((*mediaArray)[count])); |
147 } |
152 } |
148 |
153 |
149 CleanupStack::PopAndDestroy(mediaArray); |
154 CleanupStack::PopAndDestroy(mediaArray); |
|
155 #ifdef _DEBUG |
|
156 TTime stopTime; |
|
157 stopTime.HomeTime(); |
|
158 GLX_DEBUG2("=>CGlxCache::MediaUpdatedL() took <%d> us", |
|
159 (TInt)stopTime.MicroSecondsFrom(startTime).Int64()); |
|
160 #endif |
150 } |
161 } |
151 else |
162 else |
152 { |
163 { |
153 UpdateMediaL(aMedia); |
164 UpdateMediaL(aMedia); |
154 } |
165 } |
189 item = CreateItemL(id); |
200 item = CreateItemL(id); |
190 |
201 |
191 CopyNewAndModifiedL(*item, aMedia, newAttributes); |
202 CopyNewAndModifiedL(*item, aMedia, newAttributes); |
192 } |
203 } |
193 |
204 |
194 // Broadcast the new attributes to all observers of the item and the cache |
205 // Broadcast the new attributes to all observers of the item |
195 if (newAttributes.Count() > 0) |
206 if (newAttributes.Count() > 0) |
196 { |
207 { |
197 TInt count = item->UserCount(); |
208 TInt count = item->UserCount(); |
198 for (TInt i = 0; i < count; i++) |
209 for (TInt i = 0; i < count; i++) |
199 { |
210 { |
200 item->User( i ).HandleAttributesAvailableL( item->IndexInUser( i ), newAttributes ); |
211 item->User( i ).HandleAttributesAvailableL( item->IndexInUser( i ), newAttributes ); |
201 } |
212 } |
202 |
|
203 // Broadcast to cache observers |
|
204 // iCacheManager->BroadcastAttributesAvailableL(iIdSpaceId, id, newAttributes, item); |
|
205 } |
213 } |
206 |
214 |
207 CleanupStack::PopAndDestroy(&newAttributes); |
215 CleanupStack::PopAndDestroy(&newAttributes); |
208 } |
216 } |
209 // ----------------------------------------------------------------------------- |
217 // ----------------------------------------------------------------------------- |