|
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 // This contains CTestMessEditEntryUtil. A utility to edit an entry |
|
15 // |
|
16 |
|
17 |
|
18 #include "TestMessPrintEntryUtil.h" |
|
19 |
|
20 CTestMessPrintEntryUtil::CTestMessPrintEntryUtil(CTestMessBase& aTestStep) |
|
21 : CTestMessStoreProcessUtil(aTestStep, ETrue) |
|
22 { |
|
23 } |
|
24 |
|
25 /** |
|
26 * Prints the ImHeaders of the Entry |
|
27 * @param CImHeader& aHeader - Im Header to edit |
|
28 * @return None |
|
29 * @panic None |
|
30 * @leave KErrNoMemory |
|
31 * |
|
32 */ |
|
33 void CTestMessPrintEntryUtil::ProcessImHeaderL(CImHeader& aHeader) |
|
34 { |
|
35 TPtrC ptrTemp; |
|
36 |
|
37 ptrTemp.Set(aHeader.From()); |
|
38 iTestStep.INFO_PRINTF2(_L(" From : %S"), &ptrTemp); |
|
39 ptrTemp.Set(aHeader.ReceiptAddress()); |
|
40 iTestStep.INFO_PRINTF2(_L(" ReceiptAddress : %S"), &ptrTemp); |
|
41 ptrTemp.Set(aHeader.ReplyTo()); |
|
42 iTestStep.INFO_PRINTF2(_L(" ReplyTo : %S"), &ptrTemp); |
|
43 ptrTemp.Set(aHeader.Subject()); |
|
44 iTestStep.INFO_PRINTF2(_L(" Subject : %S"), &ptrTemp); |
|
45 } |
|
46 |
|
47 /** |
|
48 * Prints the ImMimeHeaders of the message entry |
|
49 * @param CImMimeHeader& aHeader - Mime Header to edit |
|
50 * @return None |
|
51 * @panic None |
|
52 * @leave KErrNoMemory |
|
53 * |
|
54 */ |
|
55 void CTestMessPrintEntryUtil::ProcessImMimeHeaderL(CImMimeHeader& /*aHeader*/) |
|
56 { |
|
57 } |
|
58 |
|
59 /** |
|
60 * Prints the ImIAPPreferences of the entry |
|
61 * @param CImIAPPreferences& aPreferences - IAP Preferences to edit |
|
62 * @return None |
|
63 * @panic None |
|
64 * @leave KErrNoMemory |
|
65 * |
|
66 */ |
|
67 void CTestMessPrintEntryUtil::ProcessInternetAccessPreferencesL(CImIAPPreferences& aPreferences) |
|
68 { |
|
69 TInt prefs=aPreferences.NumberOfIAPs(); |
|
70 for ( TInt pref=0; pref<prefs; ) |
|
71 { |
|
72 TImIAPChoice choice=aPreferences.IAPPreference(pref++); |
|
73 iTestStep.INFO_PRINTF2(_L(" IAP Preference : %d"), pref); |
|
74 iTestStep.INFO_PRINTF2(_L(" iIAP : %d"), choice.iIAP); |
|
75 iTestStep.INFO_PRINTF2(_L(" iDialogPref : %d"), choice.iDialogPref); |
|
76 } |
|
77 } |
|
78 |
|
79 /** |
|
80 * Prints the CSmsHeader of the entry |
|
81 * @param CSmsHeader& aHeader - Sms Header to edit |
|
82 * @return None |
|
83 * @panic None |
|
84 * @leave KErrNoMemory |
|
85 * |
|
86 */ |
|
87 void CTestMessPrintEntryUtil::ProcessSmsHeaderStreamL(CSmsHeader& aHeader) |
|
88 { |
|
89 #if (defined CDMA_API_ENABLED) |
|
90 CSmsSettings* smsSettings = CSmsSettings::NewL(); |
|
91 CleanupStack::PushL(smsSettings); |
|
92 aHeader.GetDefaultMessageSettingsL(*smsSettings); |
|
93 TSmsMessageType pduType = aHeader.MessageType(); |
|
94 TBool replyPath = smsSettings->ReplyPath(); |
|
95 CleanupStack::PopAndDestroy(smsSettings); |
|
96 #else |
|
97 CSmsPDU::TSmsPDUType pduType=aHeader.Type(); |
|
98 TBool replyPath = aHeader.ReplyPathProvided(); |
|
99 #endif |
|
100 iTestStep.INFO_PRINTF2(_L(" pduType : %d"), pduType); |
|
101 iTestStep.INFO_PRINTF2(_L(" replyPathProvided : %d"), replyPath); |
|
102 } |
|
103 |
|
104 |
|
105 /** |
|
106 * Prints the CRichText of the entry |
|
107 * @param CRichText& aBodyText - Text to edit |
|
108 * @return None |
|
109 * @panic None |
|
110 * @leave KErrNoMemory |
|
111 * |
|
112 */ |
|
113 void CTestMessPrintEntryUtil::ProcessRichTextBodyL(CRichText& /*aBodyText*/) |
|
114 { |
|
115 } |