os/security/cryptomgmtlibs/securitytestfw/test/testhandler2extra/t_inputextra.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptomgmtlibs/securitytestfw/test/testhandler2extra/t_inputextra.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,63 @@
     1.4 +/*
     1.5 +* Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef __T_INPUTEXTRA_H__
    1.23 +#define __T_INPUTEXTRA_H__
    1.24 +
    1.25 +#include <e32cons.h>
    1.26 +#include <f32file.h>
    1.27 +#include <e32std.h>
    1.28 +#include <badesca.h> 
    1.29 +#include "t_input.h"
    1.30 +
    1.31 +/**
    1.32 + * This class provides useful functions to read and parse the input file.
    1.33 + */
    1.34 +class InputExtra : public Input
    1.35 +	{
    1.36 +public: 
    1.37 +	/*
    1.38 +	Reads multilpe files into a 8 bit buffer array
    1.39 +	CDesCArray& aFilenames	[IN] - Array of filename to read
    1.40 +	const TDesC& aPath		[IN] - (Optional) Path of files, if missing path must be included in aFilenames
    1.41 +	RFs& aFs				[IN] - Reference to the file system handle class
    1.42 +
    1.43 +	Returns
    1.44 +	HBufC8*		-  Pointer to the 8 bit file data
    1.45 +	*/
    1.46 +	IMPORT_C static HBufC8* ReadFilesLC(CDesCArray& aFilenames, RFs& aFs);
    1.47 +	IMPORT_C static HBufC8* ReadFilesLC(CDesCArray& aFilenames, const TDesC& aPath, RFs& aFs);
    1.48 +	/*
    1.49 +	Reads a ascii hex file into a binary HBufC i.e. a file containing "FFAA11" will be converted into a 3 byte buffer
    1.50 +
    1.51 +	Parameters
    1.52 +	const TDesC& aFilename 	[IN] - Name of file including path to read
    1.53 +	RFs &aFs			[IN] - Reference to the file system handle class
    1.54 +
    1.55 +	Returns
    1.56 +	HBufC8*		-  Pointer to the 8 bit file data
    1.57 +	*/
    1.58 +	IMPORT_C static HBufC8* ReadHexFileLC(const TDesC& aFilename, RFs& aFs);
    1.59 +	/**
    1.60 +	 * This function reads an entire Unicode file and returns it as an HBufC.
    1.61 +	 * This function only works for Unicode builds of EPOC.
    1.62 +	 */
    1.63 +	IMPORT_C static HBufC* ReadFile16LC(const TDesC& aFilename, RFs& aFS);
    1.64 +	};
    1.65 +
    1.66 +#endif