messagingfw/msgtestfw/TestActionUtils/src/CMtfTestActionUtils.cpp
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18 */
       
    19 #include "CMtfTestActionUtils.h"
       
    20 
       
    21 
       
    22 void CMtfTestActionUtils::OpenResourceFileL(RResourceFile& rFile, RFs& anFs, const TDesC& aFileName )
       
    23 	{
       
    24 	// open resource file
       
    25 	TFileName fileName(aFileName);
       
    26 	MsvUtils::AddPathAndExtensionToResFileL(fileName);
       
    27 	BaflUtils::NearestLanguageFile( anFs, fileName );
       
    28 	if (BaflUtils::FileExists(anFs,fileName))
       
    29  		{
       
    30 		rFile.OpenL( anFs, fileName );
       
    31  		return;
       
    32  		}
       
    33  	User::Leave(KErrNotFound);
       
    34 	}
       
    35 
       
    36 
       
    37 void CMtfTestActionUtils::CloseResourceFile( TAny* aFile )
       
    38 	{
       
    39 	((RResourceFile*)aFile)->Close();
       
    40 	}