messagingfw/msgtestfw/TestActions/SendAs/inc/CMtfTestActionCompareEmails.h
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 #ifndef __CMTFTESTACTIONCOMPAREEMAILS_H__
       
    17 #define __CMTFTESTACTIONCOMPAREEMAILS_H__
       
    18 
       
    19 // System include
       
    20 #include <msvapi.h>
       
    21 
       
    22 
       
    23 // User include
       
    24 #include "CMtfSynchronousTestAction.h"
       
    25 #include "CMtfTestActionUtilsEmailMessage.h"
       
    26 
       
    27 /*@{*/
       
    28 // Literal defined for the name of the Test Action
       
    29 _LIT(KTestActionCompareEmails,"CompareEmails");
       
    30 /*@}*/
       
    31 
       
    32 
       
    33 // class forward declaration
       
    34 class CMtfTestParameter;
       
    35 
       
    36 
       
    37 /**
       
    38   Implements the test action to compare the email messages
       
    39   passed as the selections as parameter
       
    40   @internalTechnology
       
    41 */
       
    42 class CMtfTestActionCompareEmails : public CMtfSynchronousTestAction
       
    43 	{
       
    44 public:
       
    45 
       
    46 	static CMtfTestAction* NewL(CMtfTestCase& aTestCase,
       
    47 								CMtfTestActionParameters* ActionParameters
       
    48 							   );
       
    49 	// Destructor
       
    50 	virtual ~CMtfTestActionCompareEmails(); 
       
    51 
       
    52 	virtual void ExecuteActionL();
       
    53 
       
    54 private:
       
    55 	// Constructor
       
    56 	CMtfTestActionCompareEmails( CMtfTestCase& aTestCase );
       
    57 	
       
    58 	void CompareEmailsL( const CMsvEntrySelection& aMsgSelection1,
       
    59 							  	const CMsvEntrySelection& aMsgSelection2);
       
    60 	void CMtfTestActionCompareEmails::ComparePlainBodyTextL();
       
    61 	void CompareFilesL(const TPtrC aFilePath1, const TPtrC aFilePath2,
       
    62 											TInt& aError, TBool& aDiffFlag);
       
    63 	void CMtfTestActionCompareEmails::DeleteEmailMessageInfo();
       
    64 	void CMtfTestActionCompareEmails::SetEmailMessageInfoL(CMsvEntry& aMsvEntry1, CMsvEntry& aMsvEntry2);
       
    65 	void CMtfTestActionCompareEmails::CompareHtmlL();
       
    66 	void CMtfTestActionCompareEmails::CompareAttachmentsL(CMsvEntry& aMsvEntry1, CMsvEntry& aMsvEntry2);
       
    67 	TBool CMtfTestActionCompareEmails::CompareAttachmentFilesL(RFile aFile1, RFile aFile2);
       
    68 	// Check if the Test Case result is EPass
       
    69 	inline TBool IsTestCaseStatusPass();
       
    70 private:
       
    71 	/**  Session object */
       
    72 	CMsvSession* iParamSession;
       
    73 
       
    74 	/**	Utility class object storing the information of the email message*/ 
       
    75 	CMtfTestActionUtilsEmailMessage* iMessageInfo1;	
       
    76 	CMtfTestActionUtilsEmailMessage* iMessageInfo2;
       
    77 	};
       
    78 
       
    79 #include "CMtfTestActionCompareEmails.inl"
       
    80 
       
    81 #endif //__CMTFTESTACTIONCOMPAREEMAILS_H__