email/pop3andsmtpmtm/servermtmutils/mobilitytestframework/inc/msgnetteststub.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     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 "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 /**
       
    17  @file
       
    18  @internalTechnology
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef __MSGNETTESTSTUB_H__
       
    23 #define __MSGNETTESTSTUB_H__
       
    24 
       
    25 #ifdef __MOBILITY_TEST_FRAMEWORK
       
    26 
       
    27 #include <e32std.h>
       
    28 #include <comms-infras/cs_mobility_apiext.h>
       
    29 #include "mmsgtestpropertywatcher.h"
       
    30 #include <msvstd.h>
       
    31 
       
    32 class CMsgTestPropertyWatcher;
       
    33 
       
    34 namespace MSGNETTESTSTUB
       
    35 {
       
    36 
       
    37 class CActiveCommsMobilityApiExt :	public CBase,
       
    38 									public MMobilityProtocolResp,
       
    39 									public MMsgTestPropertyWatcher
       
    40 	{
       
    41 public:
       
    42 
       
    43 	//Stubbed interface:
       
    44 	IMPORT_C static CActiveCommsMobilityApiExt* NewL(RCommsSubSession& aExtensionProvider,MMobilityProtocolResp& aProtocol);
       
    45 	IMPORT_C ~CActiveCommsMobilityApiExt();
       
    46 
       
    47 	IMPORT_C void MigrateToPreferredCarrier();
       
    48 	IMPORT_C void IgnorePreferredCarrier();
       
    49 	IMPORT_C void NewCarrierAccepted();
       
    50 	IMPORT_C void NewCarrierRejected();
       
    51 
       
    52 protected:
       
    53 
       
    54 	//Internal methods:
       
    55     void ConstructL();
       
    56     explicit CActiveCommsMobilityApiExt(RCommsSubSession& aExtensionProvider, MMobilityProtocolResp& aProtocol);
       
    57 
       
    58 public:
       
    59 
       
    60 	// from MMobilityProtocolResp
       
    61 	void PreferredCarrierAvailable(TAccessPointInfo aOldAp, TAccessPointInfo aNewAp, TBool aIsUpgrade, TBool aIsSeamless);
       
    62 	void NewCarrierActive(TAccessPointInfo aNewAp, TBool aIsSeamless);
       
    63 	void Error(TInt aError);
       
    64 
       
    65 	// from MPropertyWatcher
       
    66 	void HandleEventL(RProperty& aProperty, TUint aKey);
       
    67 
       
    68 private:
       
    69 	
       
    70 	RCommsSubSession& iCommsSubSession;
       
    71 	MMobilityProtocolResp& iProtocol;
       
    72 
       
    73 	//Pointer to the real thing
       
    74 	::CActiveCommsMobilityApiExt* iCommsMobilityApi;
       
    75 	
       
    76 	//CMsgTestPropertyWatcher for IPC
       
    77 	CMsgTestPropertyWatcher* iPropertyWatcher;
       
    78 	
       
    79 	TMsvId iServiceId;
       
    80 	};
       
    81 
       
    82 }
       
    83 
       
    84 #ifndef LOCAL_INCLUDE
       
    85 #define CActiveCommsMobilityApiExt MSGNETTESTSTUB::CActiveCommsMobilityApiExt
       
    86 #endif // LOCAL_INCLUDE
       
    87 
       
    88 #endif //__MOBILITY_TEST_FRAMEWORK
       
    89 
       
    90 #endif //__MSGNETTESTSTUB_H__