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