cryptomgmtlibs/securitytestfw/test/testhandler2extra/t_inputextra.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __T_INPUTEXTRA_H__
       
    20 #define __T_INPUTEXTRA_H__
       
    21 
       
    22 #include <e32cons.h>
       
    23 #include <f32file.h>
       
    24 #include <e32std.h>
       
    25 #include <badesca.h> 
       
    26 #include "t_input.h"
       
    27 
       
    28 /**
       
    29  * This class provides useful functions to read and parse the input file.
       
    30  */
       
    31 class InputExtra : public Input
       
    32 	{
       
    33 public: 
       
    34 	/*
       
    35 	Reads multilpe files into a 8 bit buffer array
       
    36 	CDesCArray& aFilenames	[IN] - Array of filename to read
       
    37 	const TDesC& aPath		[IN] - (Optional) Path of files, if missing path must be included in aFilenames
       
    38 	RFs& aFs				[IN] - Reference to the file system handle class
       
    39 
       
    40 	Returns
       
    41 	HBufC8*		-  Pointer to the 8 bit file data
       
    42 	*/
       
    43 	IMPORT_C static HBufC8* ReadFilesLC(CDesCArray& aFilenames, RFs& aFs);
       
    44 	IMPORT_C static HBufC8* ReadFilesLC(CDesCArray& aFilenames, const TDesC& aPath, RFs& aFs);
       
    45 	/*
       
    46 	Reads a ascii hex file into a binary HBufC i.e. a file containing "FFAA11" will be converted into a 3 byte buffer
       
    47 
       
    48 	Parameters
       
    49 	const TDesC& aFilename 	[IN] - Name of file including path to read
       
    50 	RFs &aFs			[IN] - Reference to the file system handle class
       
    51 
       
    52 	Returns
       
    53 	HBufC8*		-  Pointer to the 8 bit file data
       
    54 	*/
       
    55 	IMPORT_C static HBufC8* ReadHexFileLC(const TDesC& aFilename, RFs& aFs);
       
    56 	/**
       
    57 	 * This function reads an entire Unicode file and returns it as an HBufC.
       
    58 	 * This function only works for Unicode builds of EPOC.
       
    59 	 */
       
    60 	IMPORT_C static HBufC* ReadFile16LC(const TDesC& aFilename, RFs& aFS);
       
    61 	};
       
    62 
       
    63 #endif