170 // See EMYP-79VDHP |
170 // See EMYP-79VDHP |
171 error = KErrNone; |
171 error = KErrNone; |
172 } |
172 } |
173 } |
173 } |
174 |
174 |
175 |
|
176 // If the attribute request is for Thumbnail, Check if there is a match found. |
175 // If the attribute request is for Thumbnail, Check if there is a match found. |
177 // And set the size and thumbnail quality |
176 // And set the size and thumbnail quality |
178 TIdentityRelation<TMPXAttribute> matchContent(&TMPXAttribute::MatchContentId); |
177 TIdentityRelation<TMPXAttribute> matchContent(&TMPXAttribute::MatchContentId); |
179 TMPXAttribute tnAttr(KGlxMediaIdThumbnail, 0); |
178 TMPXAttribute tnAttr(KGlxMediaIdThumbnail, 0); |
180 |
179 |
181 if (iAttributes.Find(tnAttr, matchContent) != KErrNotFound) |
180 if (aAttributes.Find(tnAttr, matchContent) != KErrNotFound) |
182 { |
181 { |
183 // Allocate CMPXAttributeSpecs |
182 // Allocate CMPXAttributeSpecs |
184 CMPXAttributeSpecs* attributeSpecs = CMPXAttributeSpecs::NewL(); |
183 CMPXAttributeSpecs* attributeSpecs = CMPXAttributeSpecs::NewL(); |
185 CleanupStack::PushL(attributeSpecs); |
184 CleanupStack::PushL(attributeSpecs); |
186 |
185 |
187 attributeSpecs->SetTObjectValueL( |
186 attributeSpecs->SetTObjectValueL( |
188 TMPXAttribute( KGlxMediaIdThumbnail, |
187 TMPXAttribute( KGlxMediaIdThumbnail, |
189 KGlxAttribSpecThumbnailSize ), |
188 KGlxAttribSpecThumbnailSize ), |
190 TSize(iDefaultSpecSize.iWidth,iDefaultSpecSize.iHeight) ); |
189 TSize(iDefaultSpecSize.iWidth,iDefaultSpecSize.iHeight) ); |
191 |
190 |
192 attributeSpecs->SetTObjectValueL( |
191 attributeSpecs->SetTObjectValueL( |
193 TMPXAttribute( KGlxMediaIdThumbnail, |
192 TMPXAttribute( KGlxMediaIdThumbnail, |
194 KGlxAttribSpecThumbnailQualityOverSpeed ), ETrue ); |
193 KGlxAttribSpecThumbnailQualityOverSpeed ), ETrue ); |
195 |
194 |
|
195 // Memory leak guard check |
|
196 if (aDetailedSpecs) |
|
197 { |
|
198 delete aDetailedSpecs; |
|
199 aDetailedSpecs = NULL; |
|
200 } |
196 aDetailedSpecs = attributeSpecs; |
201 aDetailedSpecs = attributeSpecs; |
197 |
202 |
198 // Pop from stack |
203 // Pop from stack |
199 CleanupStack::Pop(attributeSpecs); |
204 CleanupStack::Pop(attributeSpecs); |
200 |
|
201 } |
205 } |
202 |
206 |
203 // If an error was found, return KErrGeneral |
207 // If an error was found, return KErrGeneral |
204 if (error != KErrNone) |
208 if (error != KErrNone) |
205 { |
209 { |