sl@0: /* sl@0: * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef __T_INPUTEXTRA_H__ sl@0: #define __T_INPUTEXTRA_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include "t_input.h" sl@0: sl@0: /** sl@0: * This class provides useful functions to read and parse the input file. sl@0: */ sl@0: class InputExtra : public Input sl@0: { sl@0: public: sl@0: /* sl@0: Reads multilpe files into a 8 bit buffer array sl@0: CDesCArray& aFilenames [IN] - Array of filename to read sl@0: const TDesC& aPath [IN] - (Optional) Path of files, if missing path must be included in aFilenames sl@0: RFs& aFs [IN] - Reference to the file system handle class sl@0: sl@0: Returns sl@0: HBufC8* - Pointer to the 8 bit file data sl@0: */ sl@0: IMPORT_C static HBufC8* ReadFilesLC(CDesCArray& aFilenames, RFs& aFs); sl@0: IMPORT_C static HBufC8* ReadFilesLC(CDesCArray& aFilenames, const TDesC& aPath, RFs& aFs); sl@0: /* sl@0: Reads a ascii hex file into a binary HBufC i.e. a file containing "FFAA11" will be converted into a 3 byte buffer sl@0: sl@0: Parameters sl@0: const TDesC& aFilename [IN] - Name of file including path to read sl@0: RFs &aFs [IN] - Reference to the file system handle class sl@0: sl@0: Returns sl@0: HBufC8* - Pointer to the 8 bit file data sl@0: */ sl@0: IMPORT_C static HBufC8* ReadHexFileLC(const TDesC& aFilename, RFs& aFs); sl@0: /** sl@0: * This function reads an entire Unicode file and returns it as an HBufC. sl@0: * This function only works for Unicode builds of EPOC. sl@0: */ sl@0: IMPORT_C static HBufC* ReadFile16LC(const TDesC& aFilename, RFs& aFS); sl@0: }; sl@0: sl@0: #endif