equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
198 ContentAccess::CContent* content = ContentAccess::CContent::NewLC( |
198 ContentAccess::CContent* content = ContentAccess::CContent::NewLC( |
199 *fullName, ContentAccess::EContentShareReadWrite ); |
199 *fullName, ContentAccess::EContentShareReadWrite ); |
200 |
200 |
201 HBufC* mimeType = HBufC::NewLC( KMaxDataTypeLength ); |
201 HBufC* mimeType = HBufC::NewLC( KMaxDataTypeLength ); |
202 TPtr mimePtr( mimeType->Des() ); |
202 TPtr mimePtr( mimeType->Des() ); |
203 content->GetStringAttribute( ContentAccess::EMimeType, mimePtr ); |
203 User::LeaveIfError( content->GetStringAttribute( ContentAccess::EMimeType, mimePtr ) ); |
204 |
204 |
205 CAppMngr2RecognizedFile* recFile = CAppMngr2RecognizedFile::NewL( fullName, mimeType ); |
205 CAppMngr2RecognizedFile* recFile = CAppMngr2RecognizedFile::NewL( fullName, mimeType ); |
206 CleanupStack::Pop( mimeType ); |
206 CleanupStack::Pop( mimeType ); // CAppMngr2RecognizedFile takes ownership |
207 CleanupStack::PopAndDestroy( content ); |
207 CleanupStack::PopAndDestroy( content ); |
208 CleanupStack::Pop( fullName ); |
208 CleanupStack::Pop( fullName ); |
209 |
209 |
210 CleanupStack::PushL( recFile ); |
210 CleanupStack::PushL( recFile ); |
211 iResultArray.AppendL( recFile ); |
211 iResultArray.AppendL( recFile ); |