telephonyprotocols/umtsgprsscpr/spudfsm/inc/PDPFSM.h
changeset 42 3adadc800673
equal deleted inserted replaced
31:8ab6687fb94c 42:3adadc800673
       
     1 // Copyright (c) 2004-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 // Interface to the PDP Context Finite State Machine
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef PDPFSM_H
       
    24 #define PDPFSM_H
       
    25 
       
    26 
       
    27 #include <networking/mpdpfsminterface.h>
       
    28 #include "RSpudManInterface.h"
       
    29 
       
    30 class CPdpFsmFactory;
       
    31 class CUmtsGprsDefaultSubConnProvd;
       
    32 
       
    33 
       
    34 class CPdpFsmInterface : public MPdpFsmInterface
       
    35 /**
       
    36  * UmtsGprsSCPR implemenation for the MPdpFsmInterface
       
    37  *
       
    38  * @internalComponent
       
    39  */
       
    40  {
       
    41  public:
       
    42 	//-=========================================================
       
    43 	// custom methods
       
    44 	//-=========================================================	
       
    45     CPdpFsmInterface(CUmtsGprsDefaultSubConnProvd& aOwner);
       
    46 	virtual ~CPdpFsmInterface();
       
    47 
       
    48     void SpudInput (TContextId aPdpId, TInt aNotification, TInt aParam);
       
    49 	
       
    50 	//-=========================================================
       
    51 	// MPdpFsmInterface methods
       
    52 	//-=========================================================	
       
    53 	virtual void OpenL(MSpudManInterface * aSpudManInterface, TName& aName);
       
    54 	virtual void Close();
       
    55 
       
    56 	virtual TInt Input (TContextId aPdpId, const TInt aOperation, const TInt aParam=KErrNone);
       
    57 
       
    58 	virtual TInt Set(TContextId aPdpId, const TTFTInfo& aParam);
       
    59 	virtual TInt Set(TContextId aPdpId, const TTFTOperationCode& aParam);
       
    60 	virtual TInt Set(TContextId aPdpId, const RPacketContext::TDataChannelV2& aParam);
       
    61 	virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextConfigGPRS& aParam);
       
    62 	virtual TInt Set(TContextId aPdpId, const RPacketContext::TContextStatus& aParam);
       
    63 
       
    64 
       
    65 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    66 	
       
    67 	// This is to set the status of IM CN signalling parameter
       
    68 	virtual void SetIMCNSignalling(TBool aImCnSignalling);
       
    69 	
       
    70 	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Requested& aParam);
       
    71 	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR5Negotiated& aParam);
       
    72 	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Requested& aParam) const;
       
    73 	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR5Negotiated& aParam) const;
       
    74 
       
    75 #else
       
    76 // !SYMBIAN_NETWORKING_UMTSR5 
       
    77 
       
    78 	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Requested& aParam) const;
       
    79 	virtual TInt Get(TContextId aPdpId, RPacketQoS::TQoSR99_R4Negotiated& aParam) const;
       
    80 	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Requested& aParam);
       
    81 	virtual TInt Set(TContextId aPdpId, const RPacketQoS::TQoSR99_R4Negotiated& aParam);
       
    82 
       
    83 #endif 
       
    84 // SYMBIAN_NETWORKING_UMTSR5 
       
    85 
       
    86 
       
    87 	virtual TInt Get(TContextId aPdpId, TTFTInfo& aParam) const;
       
    88 	virtual TInt Get(TContextId aPdpId, TTFTOperationCode& aParam) const;
       
    89 	virtual TInt Get(TContextId aPdpId, RPacketContext::TDataChannelV2& aParam) const;
       
    90 	virtual TInt Get(TContextId aPdpId, RPacketContext::TContextConfigGPRS& aParam) const;
       
    91 	virtual TInt Get(TContextId aPdpId, RPacketContext::TContextStatus& aParam) const;
       
    92 
       
    93 	virtual TInt GetLastErrorCause(TContextId aPdpId, TInt& aLastErrorCause) const;
       
    94 
       
    95 	virtual void Set(const RPacketService::TStatus  aParam); // applies to all contexts
       
    96 	virtual void Get(RPacketService::TStatus& aParam);// applies to all contexts
       
    97 
       
    98 	virtual const TName& TsyName(void);
       
    99 
       
   100 	void SetContextTerminationErrorAndStop(TContextId aPdpId, TInt aErrorCode);
       
   101 
       
   102  protected:
       
   103  private:
       
   104 	// DO NOT provide implementations to these methods: Copying this object should be disabled
       
   105 	CPdpFsmInterface(CPdpFsmInterface&);
       
   106 	CPdpFsmInterface& operator= (CPdpFsmInterface& aInput);
       
   107 	
       
   108  public:
       
   109  protected:
       
   110  private:
       
   111 	// FSM Factory - churns out FSMs
       
   112 	CPdpFsmFactory*               iPdpFsmFactory;
       
   113 
       
   114 	RPacketService::TStatus       iNetworkStatus;	
       
   115 	
       
   116 	CUmtsGprsDefaultSubConnProvd& iDefaultSubConnProvd;
       
   117 	RSpudManInterface             iSpudManInterface;
       
   118 
       
   119 };
       
   120 
       
   121 #endif
       
   122 // PDPFSM_H