os/ossrv/lowlevellibsandfws/apputils/multipartparser/test/tef/smoketest/src/mppsmoketestlib.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-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 
    18 /**
    19  @file
    20  @internalTechnology
    21 */
    22 
    23 #ifndef MMPSMOKETESTLIB_H
    24 #define MMPSMOKETESTLIB_H
    25 
    26 #include <testexecutestepbase.h>
    27 #include <testexecutelogger.h>
    28 #include <tefexportconst.h>
    29 #include <f32file.h>
    30 #include <bafl/multipartparser.h>
    31 
    32 NONSHARABLE_CLASS(CMultipartTestContainer) : public CBase
    33     {
    34     public:
    35         
    36         static CMultipartTestContainer* NewL(CTestExecuteLogger &aLogger);
    37         static CMultipartTestContainer* NewLC(CTestExecuteLogger &aLogger);
    38         
    39         virtual ~CMultipartTestContainer();
    40 
    41     private:
    42 
    43         CMultipartTestContainer(CTestExecuteLogger &aLogger);
    44         void ConstructL();
    45         /**
    46         * Return TEF logger.
    47         */
    48         inline CTestExecuteLogger& Logger() {return iLog;};
    49 				 
    50     public:
    51         // utility functions        
    52         TInt CompareFilesL( TPtrC aSrcFile, TPtrC aVerificationFile,
    53 														TBool aSkipWhiteSpace);
    54         HBufC8* ReadFileLC(const TDesC& aFileName);
    55         void WriteFileL( const TDesC& aFileName,
    56                          RPointerArray<CBodyPart>& aBodyPartArray );
    57         void WriteToDiskL( const TDesC& aFileName, const TDesC8& aData );
    58 			
    59         // test functions
    60         void ParseFileL( const TDesC& aFile, const TDesC& aUrl,
    61                          const TDesC& aOutput );
    62 
    63 			
    64   private: 
    65     
    66 	CTestExecuteLogger& iLog; 
    67 			
    68 	
    69 		// cheap resize 
    70 	RHeap* he;
    71 	RHeap* oldHeap;
    72 	CTrapCleanup* cleanup;
    73 	
    74     };
    75 
    76 #endif
    77 
    78