|
1 /** |
|
2 * Copyright (c) 2004-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 "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 |
|
20 /** |
|
21 @file |
|
22 @internalTechnology |
|
23 */ |
|
24 |
|
25 #ifndef __CMTF_TEST_ACTION_COMPARE_POP3_EMAIL_MESSAGES_H__ |
|
26 #define __CMTF_TEST_ACTION_COMPARE_POP3_EMAIL_MESSAGES_H__ |
|
27 |
|
28 #include <msvapi.h> |
|
29 #include <e32def.h> |
|
30 #include <e32des8.h> |
|
31 #include <msvstd.h> |
|
32 #include <miutmsg.h> |
|
33 #include <imapset.h> |
|
34 |
|
35 #include <mmsvattachmentmanager.h> |
|
36 #include <cmsvattachment.h> |
|
37 |
|
38 |
|
39 |
|
40 #include "CExpMailInfo.h" |
|
41 #include "CMtfSynchronousTestAction.h" |
|
42 |
|
43 /*@{*/ |
|
44 /// Literal defined for the name of the Test Action |
|
45 _LIT(KTestActionVerifyEmail,"VerifyEmail"); |
|
46 /*@}*/ |
|
47 |
|
48 |
|
49 /** |
|
50 Implements the action to compare email body text |
|
51 the partial/full download limits set. |
|
52 @internalTechnology |
|
53 */ |
|
54 |
|
55 |
|
56 class CPop3MailInfo; |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 class CMsvEntry; |
|
64 class CImEmailMessage; |
|
65 |
|
66 |
|
67 class CAttachmentItem : CBase |
|
68 { |
|
69 public: |
|
70 static CAttachmentItem* NewL(CMsvSession& aSession, TMsvEntry aEntry); |
|
71 static CAttachmentItem* NewLC(CMsvSession& aSession, TMsvEntry aEntry); |
|
72 ~CAttachmentItem(); |
|
73 |
|
74 void ConstructL(CMsvSession& aSession, TMsvEntry aEntry); |
|
75 MMsvAttachmentManager& MMsvAttachmentManager() const; |
|
76 |
|
77 private: |
|
78 CMsvEntry* iMsvEntry; |
|
79 CImEmailMessage* iEmailMsg; |
|
80 |
|
81 }; |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 class CMtfTestActionVerifyEmail : public CMtfSynchronousTestAction |
|
87 { |
|
88 public: |
|
89 static CMtfTestAction* NewL( CMtfTestCase& aTestCase, CMtfTestActionParameters* ActionParameters ); |
|
90 virtual ~CMtfTestActionVerifyEmail(); |
|
91 virtual void ExecuteActionL(); |
|
92 private: |
|
93 CMtfTestActionVerifyEmail(CMtfTestCase& aTestCase); |
|
94 TMsvId GetMessagePartIndexL( TMsvEntry& aEntry, TUid aUid ); |
|
95 TBool CheckIfFooterMessageExistsL( TPtrC& aRecvBodyText, TInt& aFooterSize ); |
|
96 TBool DoCompareL( TMsvEntry& aRecvEntry, CExpPop3MailInfo& aMailInfo, TMsvEntry& aSentEntry ); |
|
97 TInt GetMessageLinesL(TMsvEntry& aEntry, TUid aUid, TBool& aFooterExists, TInt &aFooterSize ); |
|
98 TInt CountLinesOfBodyTextL( CMsvEntry& aEntry, TBool& aFooterExists, TInt& aFooterSize ); |
|
99 TInt CountLinesOfHtmlL( CMsvEntry& aEntry ); |
|
100 TBool LoadParametersL(); |
|
101 void CMtfTestActionVerifyEmail::CheckPartialDownloadedFlag(); |
|
102 |
|
103 TBool CheckAttachmentsL( TMsvEntry& aRecvEntry, CExpPop3MailInfo& aMailInfo, TMsvEntry& aSentEntry ); |
|
104 TBool CompareFilesL( TFileName& aFileName1, TFileName& aFileName2 ); |
|
105 CMsvSession* iSession; |
|
106 CMsvEntrySelection* iSentSelectionList; |
|
107 CMsvEntrySelection* iInboxSelectionList; |
|
108 RPointerArray<CExpPop3MailInfo> iExpResults; |
|
109 RFs iFs; |
|
110 }; |
|
111 |
|
112 #endif //__CMTF_TEST_ACTION_COMPARE_POP3_EMAIL_MESSAGES_H__ |