equal
deleted
inserted
replaced
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
428 CleanupClosePushL(rfs); |
428 CleanupClosePushL(rfs); |
429 RFile file; |
429 RFile file; |
430 User::LeaveIfError(file.Open(rfs, iResourceFileName, EFileRead | EFileShareReadersOnly)); |
430 User::LeaveIfError(file.Open(rfs, iResourceFileName, EFileRead | EFileShareReadersOnly)); |
431 CleanupClosePushL(file); |
431 CleanupClosePushL(file); |
432 // read entire resource file into a buffer |
432 // read entire resource file into a buffer |
433 TInt fileSize; |
433 TInt fileSize(0); |
434 User::LeaveIfError(file.Size(fileSize)); |
434 User::LeaveIfError(file.Size(fileSize)); |
435 RBuf8 buf; |
435 RBuf8 buf; |
436 buf.CreateL(fileSize); |
436 buf.CreateL(fileSize); |
437 CleanupClosePushL(buf); |
437 CleanupClosePushL(buf); |
438 User::LeaveIfError(file.Read(buf)); |
438 User::LeaveIfError(file.Read(buf)); |