mobilemessaging/smsmtm/test/inc/t_smsbiofication.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 15:49:35 +0300
changeset 27 e4592d119491
parent 0 72b543305e3a
permissions -rw-r--r--
Revision: 201017 Kit: 201019

// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#include <smsclnt.h>
#include <smuthdr.h>
#include "smstestbase.h"
#include <smsuaddr.h>

_LIT(KSmsBioficationTestName, "Enumerate and Write BIO messages to SIM or phone");

class CSmsBioficationTest : public CSmsTestBase
	{
public:
	static CSmsBioficationTest* NewLC(CSmsTestUtils& aSmsTest, const TDesC& aScriptFile, TInt& aNextTest);
	~CSmsBioficationTest();

private:
	CSmsBioficationTest(CSmsTestUtils& aSmsTest, const TDesC& aScriptFile, TInt& aNextTest);
	void ConstructL();

	void RunL();
	void DoCancel();
//  Tests
	void TestSetupL();
	void TestEnumerateL();
	void TestCopyToPhoneStoreL();
	void TestCopyFromPhoneStoreL();
	void TestMoveFromPhoneStoreL();
	void TestDeleteFromPhoneStoreL();
	void TestSendL();
	void TestDeleteEnumerationFolderL();
	void TestCopyToPhoneStoreWithClass2FolderL();
	void TestMoveToPhoneStoreWithClass2FolderL();
	
	void RunAutoL();
	void ShowMenuL();

	void RunEnumerateL();
	void RunCopyToPhoneStoreL();
	void RunCopyMoveDeleteFromPhoneStoreL();

	void DeleteEntriesFromTestFolderL();
	void ChangeMtmUidsL(CMsvEntrySelection& aSelection);
	TBool CompareSelectionsL(const CMsvEntrySelection& aSelection1,const CMsvEntrySelection& aSelection2);
	TBool CompareEntriesL(TMsvId aId1, TMsvId aId2);

	void SetClass2FolderL(TMsvId aFolder);
private:
	enum TSchSmsTestState
		{
		EStateIdle,
		EStateSettingUp,
		EStateEnumerating,
		EStateCopyingToPhoneStore,
		EStateCopyingFromPhoneStore,
		EStateMovingFromPhoneStore,
		EStateDeletingFromPhoneStore,
		EStateDeletingEnumerationFolder,
		EStateSending,
		} iState;
	TMsvId iEnumerationFolderId;
	TMsvId iTestFolderId;
	CMsvEntrySelection* iTestSelection;
	RSocketServ iSocketServ;
	RSocket iSocket;
	};