telephonyprotocols/pdplayer/umts/spudfsm/src/cpdpfsm.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
child 69 b982c3e940f3
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     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 // PDP FSM header
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef CPDPFSM_H
       
    24 #define CPDPFSM_H
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <etelmm.h>
       
    28 #include <etelqos.h>
       
    29 #include <networking/umtsnifcontrolif.h>
       
    30 #include "reteldriverinput.h"
       
    31 #include "pdpfsmnmspace.h"
       
    32 #include "PDPFSM.h"
       
    33 #include "tpdpstates.h"
       
    34 
       
    35 class CPdpFsmFactory;
       
    36 class RPacketQoS;
       
    37 
       
    38 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    39 class TQoSR5Requested;
       
    40 class TQoSR5Negotiated; 
       
    41 #else
       
    42 class TQoSR99_R4Requested;
       
    43 class TQoSR99_R4Negotiated;
       
    44 
       
    45 #endif 
       
    46 // SYMBIAN_NETWORKING_UMTSR5
       
    47 class TFTInfo;
       
    48 class TFTOperationCode;
       
    49 class CPdpFsm : public CBase
       
    50 {
       
    51 	friend class TPdpState;
       
    52 	friend class TPdpStateInitialised;
       
    53 	friend class TPdpStateOpeningPhone;
       
    54 	friend class TPdpStateCreatingPrimary;
       
    55 	friend class TPdpStateActivatingPrimary;
       
    56 	friend class TPdpStateCreatingSecondary;
       
    57 	friend class TPdpStateCreatedSecondary;
       
    58 	friend class TPdpStateSettingQoS;
       
    59 	friend class TPdpStateSettingTFT;
       
    60 	friend class TPdpStateActivatingSecondary;
       
    61 	friend class TPdpStateOpen;
       
    62 	friend class TPdpStateChangingQoS;
       
    63 	friend class TPdpStateChangingTFT;
       
    64 	friend class TPdpStateGettingNegQoS;
       
    65 	friend class TPdpStateModifyingActive;
       
    66 	friend class TPdpStateSuspended;
       
    67 	friend class TPdpStateClosing;
       
    68 	friend class TPdpStateStopping;
       
    69 	friend class TPdpStateCreatingMbms;
       
    70 	friend class TPdpStateActivatingMbms;
       
    71 	friend class TPdpStateCreatedMbms;
       
    72 	
       
    73 public:
       
    74 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
    75 	static CPdpFsm* NewL(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput);
       
    76 #else
       
    77 	static CPdpFsm* NewL(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput, MPdpFsmEventHandler& aPdpFsmEventHandler, SpudMan::TPdpContextType aContextType);
       
    78 #endif
       
    79 	
       
    80 	~CPdpFsm();
       
    81 
       
    82 	TInt Input (const TInt aOperation, const TInt aParam);
       
    83 	
       
    84 
       
    85 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    86 	void Get(RPacketQoS::TQoSR5Requested& aParam);
       
    87 	void Get(RPacketQoS::TQoSR5Negotiated& aParam);
       
    88 	void Set(const RPacketQoS::TQoSR5Requested& aParam);
       
    89 	void Set(const RPacketQoS::TQoSR5Negotiated& aParam);
       
    90 
       
    91 #else
       
    92 	void Get(RPacketQoS::TQoSR99_R4Requested& aParam);
       
    93 	void Get(RPacketQoS::TQoSR99_R4Negotiated& aParam);
       
    94 	void Set(const RPacketQoS::TQoSR99_R4Requested& aParam);
       
    95 	void Set(const RPacketQoS::TQoSR99_R4Negotiated& aParam);
       
    96 #endif 
       
    97 // SYMBIAN_NETWORKING_UMTSR5
       
    98 
       
    99 	void Get(TTFTInfo& aParam);
       
   100 	void Get(TTFTOperationCode& aParam);
       
   101 	void Get(RPacketContext::TDataChannelV2& aParam);
       
   102 	void Get(TPacketDataConfigBase& aParam);
       
   103 	void Get(RPacketContext::TContextStatus& aParam);
       
   104  	
       
   105 	void Set(const TTFTInfo& aParam);
       
   106 	void Set(const TTFTOperationCode& aParam);
       
   107 	void Set(const RPacketContext::TDataChannelV2& aParam);
       
   108 	void Set(const TPacketDataConfigBase& aParam);
       
   109 
       
   110 	//mbms set parameters
       
   111 	void Set(const RPacketMbmsContext::TContextConfigMbmsV1& aParam);
       
   112 	void Get(RPacketMbmsContext::TContextConfigMbmsV1& aParam);
       
   113 	void Set(const TSessionOperatioInfo& aParam );
       
   114 	void Get(TSessionOperatioInfo& aParam);
       
   115 
       
   116 	void Set(const RPacketContext::TContextStatus& aParam);
       
   117 
       
   118     void EtelInput (EtelDriver::TEtelInput aOperation);
       
   119 	void EtelCancel (void);
       
   120     void SpudInput (TInt aNotification, TInt aParam);
       
   121     
       
   122 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY	
       
   123 	void Set(MPdpFsmEventHandler& aPdpFsmEventHandler);
       
   124 #endif    
       
   125     
       
   126 protected:
       
   127 private:
       
   128 
       
   129 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
   130 	CPdpFsm(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput);
       
   131 #else
       
   132 	CPdpFsm(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput, MPdpFsmEventHandler& aPdpFsmEventHandler, SpudMan::TPdpContextType aContextType);
       
   133 #endif
       
   134 	void ConstructL();
       
   135 	
       
   136 	void ChangeStateToInitialised(void);
       
   137 	void ChangeStateToOpeningPhone(void);
       
   138 	void ChangeStateToCreatingPrimary(void);
       
   139 	void ChangeStateToActivatingPrimary(void);
       
   140 	void ChangeStateToCreatingSecondary(void);
       
   141 	void ChangeStateToCreatedSecondary(void);
       
   142 	void ChangeStateToSettingQoS(void);
       
   143 	void ChangeStateToSettingTFT(void);
       
   144 	void ChangeStateToActivatingSecondary(void);
       
   145 	void ChangeStateToOpen(void);
       
   146 	void ChangeStateToChangingQoS(void);
       
   147 	void ChangeStateToChangingTFT(void);
       
   148 	void ChangeStateToGettingNegQoS(void);
       
   149 	void ChangeStateToModifingActive(void);
       
   150 	void ChangeStateToSuspended(void);
       
   151 	void ChangeStateToClosing(void);
       
   152 	void ChangeStateToStopping(void);
       
   153 	void ChangeStateToCreatingMbms(void);
       
   154 	void ChangeStateToActivatingMbms(void);
       
   155 	void ChangeStateToCreatedMbms(void);
       
   156 
       
   157 	void InitialiseContextConfig(TUint32 aConfigRel);
       
   158 	
       
   159     template<class CONTEXTTYPE>
       
   160 	CONTEXTTYPE& GetContextConfigAs()
       
   161 	    {
       
   162 	    __ASSERT_COMPILE(PdpFsm::KContextConfigBufferSize >= sizeof(CONTEXTTYPE));
       
   163 	    return *const_cast<CONTEXTTYPE*>(reinterpret_cast<const CONTEXTTYPE*>(iContextConfig.Ptr()));
       
   164 	    }
       
   165 
       
   166 
       
   167 public:
       
   168 protected:
       
   169 private:
       
   170 	
       
   171 	// local data cache for this context
       
   172 	TRequestedProfileBuffer iQosRequested;
       
   173 	TNegotiatedProfileBuffer iQosNegotiated;
       
   174 
       
   175 	RPacketContext::TDataChannelV2     iDataChannelV2;
       
   176 	RPacketContext::TContextStatus     iContextStatus;
       
   177 	TTFTInfo 						   iTFT;
       
   178 	TTFTOperationCode				   iTFTOperationCode;
       
   179 	RBuf8 iContextConfig;
       
   180 	RPacketMbmsContext::TContextConfigMbmsV1 iMbms;
       
   181 	TSessionOperatioInfo			 	iSessionInfo;	
       
   182 	CPdpFsmFactory   * iPdpFsmFactory; // need stuff from  factory
       
   183 	REtelDriverInput * iEtelDriverInput;
       
   184 	
       
   185 	TPdpState * iState; // current state
       
   186 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY	
       
   187 	MPdpFsmEventHandler* iPdpFsmEventHandler;
       
   188 #endif
       
   189 	TContextId  iPdpId; // our instance PDP context id - fixed when allocateed
       
   190 
       
   191 	SpudMan::TPdpContextType	 iContextType;
       
   192 };
       
   193 
       
   194 
       
   195 
       
   196 #endif // CPDPFSM_H
       
   197 
       
   198 
       
   199