common/tools/ats/smoketest/email/mobilitytestframework/inc/cimmobilitytestframework.h
changeset 719 d5603c08781b
child 872 17498133d9ad
equal deleted inserted replaced
718:b18be44be852 719:d5603c08781b
       
     1 // Copyright (c) 2007-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 the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CIMMOBILITYTESTFRAMEWORK_H__
       
    17 #define __CIMMOBILITYTESTFRAMEWORK_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <msvstd.h>
       
    21 #include <cs_mobility_apiext.h>  // MMobilityProtocolResp
       
    22 #include "mmsgtestpropertywatcher.h"
       
    23 #include "timmobilitytestmtmstate.h"
       
    24 
       
    25 // Forward class references
       
    26 class CImMobilityManager;
       
    27 class CMsgTestPropertyWatcher;
       
    28 
       
    29 /**
       
    30 The test framework class.
       
    31 
       
    32 @internalComponent
       
    33 @released
       
    34 */
       
    35 class CImMobilityTestFramework : public CBase,
       
    36 									public MMsgTestPropertyWatcher
       
    37 	{
       
    38 public:
       
    39 	IMPORT_C static void Create(TMsvId aServiceId, CImMobilityManager& aMobilityManager);
       
    40 	IMPORT_C static void Delete(CImMobilityManager& aMobilityManager);
       
    41 	IMPORT_C static void MtmState(TMsvId aServiceId, TImMobilityTestMtmState aMtmState);
       
    42 	IMPORT_C static TMsvId GetServiceId(MMobilityProtocolResp& aProtocol);
       
    43 
       
    44 	~CImMobilityTestFramework();
       
    45 	TMsvId ServiceId();
       
    46 	CImMobilityManager& MobilityManager();
       
    47 	void TimerExpired();
       
    48 	
       
    49 	// from MMsgTestPropertyWatcher
       
    50 	void HandleEventL(RProperty& aProperty, TUint /*aKey*/);
       
    51 
       
    52 private:
       
    53 	static void NewL(TMsvId aServiceId, CImMobilityManager& aMobilityManager);
       
    54 	CImMobilityTestFramework(TMsvId aServiceId, CImMobilityManager& aMobilityManager);
       
    55 	void ConstructL();
       
    56 
       
    57 private:
       
    58 	// Mobility manager
       
    59 	CImMobilityManager& iMobilityManager;
       
    60 
       
    61 	// Service Id of related MTM
       
    62 	TMsvId iServiceId;
       
    63 	
       
    64 	// Property watcher for Publish&Subscribe
       
    65 	CMsgTestPropertyWatcher* iPropertyWatcher;
       
    66 	};
       
    67 
       
    68 #endif //__CIMMOBILITYTESTFRAMEWORK_H__