telephonyprotocols/umtsgprsscpr/Test/te_spud/inc/CPdpFsmInterface.h
changeset 69 b982c3e940f3
parent 59 ac20d6a0a19d
child 73 70d75957b98f
equal deleted inserted replaced
59:ac20d6a0a19d 69:b982c3e940f3
     1 // Copyright (c) 2005-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  @internalComponent
       
    19 */
       
    20 
       
    21 // NOTE: This guard define is used to prevent the real PDPFSM.h from being included.
       
    22 //       This file MUST be included first in test code
       
    23 #ifndef PDPFSM_H
       
    24 #define PDPFSM_H
       
    25 
       
    26 
       
    27 #include <networking/mpdpfsminterface.h>
       
    28 #include "RSpudManInterface.h"
       
    29 #include <etelpckt.h>
       
    30 
       
    31 class CPdpFsmFactory;
       
    32 
       
    33 /**
       
    34 Dummy implementation of the MPdpFsmInterface that is seperated from the UmtsGprsSCPR
       
    35 */
       
    36 class CPdpFsmInterface : public MPdpFsmInterface
       
    37    {
       
    38 public:
       
    39 	//-=========================================================
       
    40 	// custom methods
       
    41 	//-=========================================================	
       
    42     CPdpFsmInterface();
       
    43     ~CPdpFsmInterface();
       
    44 
       
    45     // We need this 'factory' method since the test harness has to have a means (albeit indirect) of
       
    46     // creating the CPdpFsm objects, but within the Active Scheduler Thread (terminology from the test's
       
    47     // design document). and not within the test harness (which is what happens if they get created via
       
    48     // 'MPdpFsmInterface' Set() or Get() methods in this test harness). Because the 'CEtelDriverContext'
       
    49     // objects that are indirectly created are added to the test thread's ActiveScheduler
       
    50     //
       
    51     TInt NewFsmContext(TContextId aPdpId);
       
    52 
       
    53     void SpudInput (TContextId aPdpId, TInt aNotification, TInt aParam);
       
    54 	
       
    55 	//-=========================================================
       
    56 	// MPdpFsmInterface methods
       
    57 	//-=========================================================	
       
    58 	virtual void OpenL(MSpudManInterface * aSpudManInterface, TName& aName);
       
    59 	virtual void Close();
       
    60 	
       
    61 	virtual TInt Input (TContextId aPdpId, const TInt aOperation, const TInt aParam=KErrNone);
       
    62 
       
    63 	
       
    64 	
       
    65 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    66     virtual void SetIMCNSignalling(TBool aImCnSignalling);
       
    67 	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam);
       
    68 	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam);
       
    69 	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const;
       
    70 	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const;
       
    71 
       
    72 #else
       
    73 // !SYMBIAN_NETWORKING_UMTSR5 
       
    74 
       
    75 	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam);
       
    76 	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam);
       
    77 	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const;
       
    78 	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const;
       
    79 #endif 
       
    80 // SYMBIAN_NETWORKING_UMTSR5 
       
    81 
       
    82 
       
    83 	virtual TInt Set(TContextId aPdpId, const TTFTInfo& aParam);
       
    84 	virtual TInt Set(TContextId aPdpId, const TTFTOperationCode& aParam);
       
    85 	virtual TInt Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam);
       
    86 	virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam);
       
    87 	virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam);
       
    88 
       
    89 	virtual TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const;
       
    90 
       
    91 	virtual TInt Get(TContextId aPdpId, TTFTInfo& aParam) const;
       
    92 	virtual TInt Get(TContextId aPdpId, TTFTOperationCode& aParam) const;
       
    93 	virtual TInt Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const;
       
    94 	virtual TInt Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const;
       
    95 	virtual TInt Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const;
       
    96 
       
    97 	virtual void Set(const RPacketService::TStatus aParam); // applies to all contexts
       
    98 	virtual void Get(RPacketService::TStatus& aParam);// applies to all contexts
       
    99 
       
   100 	virtual const TName& TsyName(void);
       
   101 
       
   102 	virtual void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode);
       
   103 
       
   104 protected:
       
   105 private:
       
   106 	// DO NOT provide implementations to these methods: Copying this object should be disabled
       
   107 	CPdpFsmInterface(CPdpFsmInterface&);
       
   108 	CPdpFsmInterface& operator= (CPdpFsmInterface& aInput);
       
   109 	
       
   110 public:
       
   111 protected:
       
   112 private:
       
   113 	// FSM Factory - churns out FSMs
       
   114 	CPdpFsmFactory * iPdpFsmFactory;
       
   115 
       
   116 	RPacketService::TStatus iNetworkStatus;	
       
   117 	
       
   118 	RSpudManInterface iSpudManInterface;
       
   119 
       
   120 	TBool iSpudMainInterfaceSet;
       
   121 };
       
   122 
       
   123 #endif
       
   124 // PDPFSM_H