|
1 /** |
|
2 * Copyright (c) 2006-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 the License "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file |
|
24 */ |
|
25 |
|
26 |
|
27 #ifndef __T_COMPARE_POP_EMAIL_MSGS_H__ |
|
28 #define __T_COMPARE_POP_EMAIL_MSGS_H__ |
|
29 |
|
30 |
|
31 // User include |
|
32 #include "T_MsgAsyncStepPOP.h" |
|
33 #include "T_MsgSharedDataPop.h" |
|
34 |
|
35 |
|
36 // Epoc include |
|
37 #include <msvstd.h> |
|
38 |
|
39 // Literal used |
|
40 _LIT(KComparePopEmailMsgs,"ComparePopEmailMsgs"); |
|
41 |
|
42 |
|
43 // Forward declaration |
|
44 class CImEmailMessage; |
|
45 class CExpPop3MailInfo; |
|
46 class CMsvSession; |
|
47 class MMsvAttachmentManager; |
|
48 |
|
49 |
|
50 /** |
|
51 Retireves the attacments related to a message entry. |
|
52 */ |
|
53 class CAttachmentItem : CBase |
|
54 { |
|
55 public: |
|
56 static CAttachmentItem* NewL(CMsvSession& aSession, TMsvEntry aEntry); |
|
57 static CAttachmentItem* NewLC(CMsvSession& aSession, TMsvEntry aEntry); |
|
58 ~CAttachmentItem(); |
|
59 |
|
60 void ConstructL(CMsvSession& aSession, TMsvEntry aEntry); |
|
61 MMsvAttachmentManager& MMsvAttachmentManager() const; |
|
62 |
|
63 private: |
|
64 CMsvEntry* iMsvEntry; |
|
65 CImEmailMessage* iEmailMsg; |
|
66 }; |
|
67 |
|
68 |
|
69 /** |
|
70 Implements the test step to compare email body text with the |
|
71 partial/full download limits set. |
|
72 */ |
|
73 class CT_MsgComparePopEmailMsgs : public CT_MsgAsyncStepPOP |
|
74 { |
|
75 public: |
|
76 static CT_MsgComparePopEmailMsgs* NewL(CT_MsgSharedDataPop& aSharedDataPOP); |
|
77 ~CT_MsgComparePopEmailMsgs(); |
|
78 |
|
79 // CTestStep implementation |
|
80 virtual TVerdict doTestStepL(); |
|
81 |
|
82 private: |
|
83 CT_MsgComparePopEmailMsgs(CT_MsgSharedDataPop& aSharedDataPOP); |
|
84 |
|
85 // CT_MsgAsyncStep implementation |
|
86 virtual void ProgressL(TBool bFinal); |
|
87 |
|
88 // MT_MsgActiveCallback implementation |
|
89 virtual void CancelStep(); |
|
90 |
|
91 TMsvId GetMessagePartIndexL(TMsvEntry& aEntry, TUid aUid); |
|
92 TBool CheckIfFooterMessageExistsL(TPtrC& aRecvBodyText, TInt& aFooterSize); |
|
93 TBool DoCompareL(TMsvEntry& aRecvEntry, CExpPop3MailInfo& aMailInfo, TMsvEntry& aSentEntry); |
|
94 TInt GetMessageLinesL(TMsvEntry& aEntry, TUid aUid, TBool& aFooterExists, TInt &aFooterSize); |
|
95 TInt CountLinesOfBodyTextL(CMsvEntry& aEntry, TBool& aFooterExists, TInt& aFooterSize); |
|
96 TInt CountLinesOfHtmlL(CMsvEntry& aEntry); |
|
97 TBool LoadParametersL(); |
|
98 |
|
99 CExpPop3MailInfo* GetExpPop3MailInfoLC(TInt aIndx); |
|
100 TBool CheckAttachmentsL(TMsvEntry& aRecvEntry, CExpPop3MailInfo& aMailInfo, TMsvEntry& aSentEntry); |
|
101 TBool CompareFilesL(TFileName& aFileName1, TFileName& aFileName2); |
|
102 TInt CT_MsgComparePopEmailMsgs::CheckIfServerMessageExists(TPtrC aBodyText); |
|
103 |
|
104 private: |
|
105 CMsvEntrySelection* iSentSelectionList; |
|
106 CMsvEntrySelection* iInboxSelectionList; |
|
107 RPointerArray<CExpPop3MailInfo> iExpResults; |
|
108 RFs iFs; |
|
109 }; |
|
110 |
|
111 #endif //__T_COMPARE_POP_EMAIL_MSGS_H__ |