messagingfw/scheduledsendmtm/test/unit/inc/t_schsend1.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 1999-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 #include "msvtestutils.h"
       
    17 #include <msvstd.h>
       
    18 #include "pigeonservermtm.h"
       
    19 #include "msvtestutils.h"
       
    20 
       
    21 
       
    22 class CScheduleTestActive : public CActive, public MMsvSessionObserver
       
    23 	{
       
    24 	public:
       
    25 
       
    26 		static CScheduleTestActive* CScheduleTestActive::NewL(CMsvTestUtils& aTest);
       
    27 		void TransferCommandSyncL(CPigeonServerMtm::TPigOperation aCommand, const CMsvEntrySelection& aSelection, TBool aStopAtRunL = EFalse);
       
    28 		~CScheduleTestActive();
       
    29 		void HandleSessionEventL(TMsvSessionEvent, TAny*, TAny*, TAny*);
       
    30 		
       
    31 	//	TTime LastTime();
       
    32 	private:
       
    33 		CScheduleTestActive::CScheduleTestActive(CMsvTestUtils& aTest);
       
    34 		//CScheduleTestActive(CTestUtils& aTest);
       
    35 		void RunL();
       
    36 		void DoCancel() {};
       
    37 
       
    38 		CPigeonServerMtm::TPigOperation iCommand;
       
    39 		CMsvTestUtils&					iTest;
       
    40 		CMsvEntrySelection*				iSelection;
       
    41 		CMsvSession*					iSession;
       
    42 		TBool							iStopAtRunL;
       
    43 	};
       
    44 
       
    45 class CSchSendTest : public CMsvTestUtils, public MMsvSessionObserver
       
    46 	{
       
    47 	public:
       
    48 		static CSchSendTest* NewL(RTest& aTest);
       
    49 		~CSchSendTest();
       
    50 
       
    51 		void StartL();
       
    52 		void HandleSessionEventL(TMsvSessionEvent, TAny*, TAny*, TAny*) {};
       
    53 	
       
    54 	protected:
       
    55 
       
    56 		void Panic(TInt aPanic);
       
    57 		CSchSendTest(RTest& aTest);
       
    58 		void ConstructL();
       
    59 
       
    60 		void ShowMenuL();
       
    61 		void RunAutoL();
       
    62 
       
    63 		void TestSchedulingMessageL();
       
    64 
       
    65 		TMsvEntry CreateMessageLC(TMsvId aDestFolder, TTime aSendTime, TBool aOffPeak = EFalse);
       
    66 
       
    67 		//From CMsvTestUtils
       
    68 		void InstantiateClientMtmsL(){};
       
    69 		void InstantiateServerMtmsL(){};
       
    70 		void DeleteServicesL(){};
       
    71 		void CreateServicesL(){};
       
    72 		void FindExistingServicesL(){};
       
    73 		void InstallMtmGroupsL();
       
    74 		void CreateServerMtmRegsL();
       
    75 	
       
    76 	private:
       
    77 	
       
    78 		CMsvEntrySelection*		iSelection;
       
    79 		CScheduleTestActive*	iSchTestActive;
       
    80 	
       
    81 	protected:
       
    82 
       
    83 		TInt iCurrentTest;
       
    84 	};