messagingappbase/smsmtm/test/inc/T_smcm.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
     1 // Copyright (c) 2000-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 T_SMCM_H_
       
    17 #define T_SMCM_H_
       
    18 #include <e32base.h>
       
    19 
       
    20 #include <s32std.h>
       
    21 #include <txtrich.h>    //CRichText
       
    22 #include <e32test.h>
       
    23 #include <msvuids.h>	// ServiceEntry, FolderEntry, etc.
       
    24 #include <mtmuids.h>	// query capabilities
       
    25 #include "smutset.h"	// sms settings
       
    26 #include "smuthdr.h"	// sms header
       
    27 #include "smsclnt.h"	// sms (a)sync commands
       
    28 #include <smstestbase.h>
       
    29 
       
    30 GLDEF_D RTest				test(_L("SMCM Test Harness"));
       
    31 GLDEF_D CTrapCleanup*		theCleanup;
       
    32 
       
    33 const TUid KUidSmcmTestNonSense = {0x00011111};
       
    34 
       
    35 const TMsvPartList KMsvMessagePartBody			= 0x00000001;
       
    36 const TMsvPartList KMsvMessagePartRecipient		= 0x00000002;
       
    37 const TMsvPartList KMsvMessagePartOriginator	= 0x00000004;
       
    38 const TMsvPartList KMsvMessagePartDescription	= 0x00000008;
       
    39 const TMsvPartList KMsvMessagePartDate			= 0x00000010;
       
    40 const TMsvPartList KMsvMessagePartAttachments	= 0x00000020;
       
    41 
       
    42 GLDEF_C TInt E32Main(void);
       
    43 LOCAL_C void doMainL(void);
       
    44 
       
    45 class CSmcmTest : public CSmsTestBase
       
    46 	{
       
    47 public:
       
    48 	static CSmcmTest* NewLC(CSmsTestUtils& aSmsTest, const TDesC& aScriptFile, TInt& aNextTest);
       
    49 	~CSmcmTest();
       
    50 
       
    51 private:
       
    52 	CSmcmTest(CSmsTestUtils& aSmsTest, const TDesC& aScriptFile, TInt& aNextTest);
       
    53 	void ConstructL();
       
    54 
       
    55 	void RunL() {};
       
    56 	void DoCancel() {};
       
    57 
       
    58 	void ShowMenuL();
       
    59 	void RunAutoL();
       
    60 
       
    61 	//Test Functions
       
    62 	void TestSettingsL();
       
    63 
       
    64 	//Client Mtm Test Functions
       
    65 	void TestCapabilitiesL();
       
    66 	void TestFindL();
       
    67 	void TestFindAliasL();
       
    68 	void TestReplyL();
       
    69 	void TestReplyEmailL();
       
    70 	void DoTestReplyEmailL(const TDesC& aEmailMessageData, const TDesC& aAddress, const TDesC& aSubject);
       
    71 	TMsvId CreateEmailSmsMessageL(const TDesC& aEmailMessageData);
       
    72 	void TestForwardL();
       
    73 	void TestForwardEmailL();
       
    74 	void TestForwardL(const TMsvEntry& aEntry, TInt aBodyLength);
       
    75 	TBool TestForwardBodyL(const CRichText& aBody, const TDesC& aExpected) const;
       
    76 	void DoTestForwardEmailL(const TDesC& aEmailMessageData, const TDesC& aSubject, const TDesC& aBody);
       
    77 	TBool TestForwardEntry(const TMsvEntry& aOriginalEntry, const TMsvEntry& aForwardEntry) const;
       
    78 	HBufC* CreateRandomLC(TInt aLen) const;
       
    79 
       
    80 	void TestSyncFunctionsL();
       
    81 
       
    82 	CSmsHeader*			iSmsHeader;
       
    83 	CRichText*			iRichText;
       
    84 	CParaFormatLayer*	iParaLayer;
       
    85 	CCharFormatLayer*	iCharLayer;
       
    86 	};
       
    87 
       
    88 
       
    89 #endif