telephonyprotocols/pdplayer/inc/PDPSCPR.h
changeset 0 3553901f7fa8
child 9 962e6306d9d2
child 19 1f776524b15c
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2006-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 SubConnection Provider class definition.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef SYMBIAN_PDPSPR_H
       
    24 #define SYMBIAN_PDPSPR_H
       
    25 
       
    26 #include <comms-infras/corescpr.h>
       
    27 #include <comms-infras/corescprstates.h>
       
    28 #include <networking/qos3gpp_subconparams.h>
       
    29 #include <cs_subconparams.h>
       
    30 #include <networking/pdpprovision.h>
       
    31 #include <comms-infras/linkprovision.h>
       
    32 #include <networking/ipaddrinfoparams.h>
       
    33 #include "PDPFSM.h"
       
    34 #include "PDPParamMapper.h"
       
    35 #include <comms-infras/commsdebugutility.h>
       
    36 namespace PDPSCprStates
       
    37     {
       
    38     class TSelfInit;
       
    39     class TCreateSecondaryOrMbmsPDPCtx;
       
    40     class TCreatePrimaryPDPCtx;
       
    41     class TActivatePDPContext;
       
    42     class TSetQoS;
       
    43     class TSetTFT;
       
    44     class TRaiseParamsChanged;
       
    45     class TRaiseParamsRejectedL;
       
    46     class TParamsEvent;
       
    47 	class TFillInImsExtParams;
       
    48     class TFillInGrantedParams;
       
    49     class TNoTagIfRejoinNeededOrDataClientReady;
       
    50     class TAwaitingPDPContextDestroyed;
       
    51     class TNoTagOrProviderStopped;
       
    52     class TSendDataClientStarted;
       
    53     class TSendDataClientStopped;
       
    54     class TApplyNewDefault;
       
    55     class TRetrieveSipAddr;
       
    56     class TModifyActivePDPContext;
       
    57 	class TSetMbmsParameters;
       
    58     }
       
    59 
       
    60 namespace PDPSCprActivities
       
    61     {
       
    62     DECLARE_ACTIVITY_MAP(activityMap)
       
    63     }
       
    64 class CPDPDefaultSubConnectionProvider;
       
    65 class CPDPSubConnectionProviderFactory;
       
    66 class CPDPSubConnectionProvider : public CCoreSubConnectionProvider, public MPdpFsmEventHandler
       
    67 /** Common subclass for default and non-default PDP subconnection providers.
       
    68 
       
    69 @internalTechnology
       
    70 @released Since 9.4 */
       
    71     {
       
    72     friend class CPDPSubConnectionProviderFactory;
       
    73     friend class PDPSCprStates::TSelfInit;
       
    74     friend class PDPSCprStates::TCreateSecondaryOrMbmsPDPCtx;
       
    75     friend class PDPSCprStates::TCreatePrimaryPDPCtx;
       
    76     friend class PDPSCprStates::TActivatePDPContext;
       
    77     friend class PDPSCprStates::TSetQoS;
       
    78     friend class PDPSCprStates::TSetTFT;
       
    79     friend class PDPSCprStates::TRaiseParamsChanged;
       
    80     friend class PDPSCprStates::TRaiseParamsRejectedL;
       
    81     friend class PDPSCprStates::TParamsEvent;
       
    82     friend class PDPSCprStates::TFillInGrantedParams;
       
    83     friend class PDPSCprStates::TFillInImsExtParams;
       
    84     friend class PDPSCprStates::TNoTagIfRejoinNeededOrDataClientReady;
       
    85     friend class PDPSCprStates::TAwaitingPDPContextDestroyed;
       
    86     friend class PDPSCprStates::TNoTagOrProviderStopped;
       
    87     friend class PDPSCprStates::TSendDataClientStarted;
       
    88     friend class PDPSCprStates::TSendDataClientStopped;
       
    89     friend class PDPSCprStates::TApplyNewDefault;
       
    90     friend class PDPSCprStates::TRetrieveSipAddr;
       
    91 	friend class PDPSCprStates::TSetMbmsParameters;
       
    92     friend class PDPSCprStates::TModifyActivePDPContext;
       
    93 
       
    94 
       
    95 public:
       
    96 	enum { EInvalidContextId = KMaxPdpContexts };
       
    97     typedef CPDPSubConnectionProviderFactory FactoryType;
       
    98 	virtual ~CPDPSubConnectionProvider();
       
    99 
       
   100     //-====================================
       
   101     //MPdpFsmEventHandler methods
       
   102     //-====================================
       
   103 	virtual void Event(TInt aEvent, TInt aParam);
       
   104 
       
   105     //-====================================
       
   106     //ACFNode overrides
       
   107     //-====================================
       
   108     void Received(MeshMachine::TNodeContextBase& aContext);
       
   109     void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
       
   110 
       
   111     virtual void LinkUp();
       
   112     virtual void LinkDown(TInt aCause);
       
   113 
       
   114     CSubConQosR99ParamSet* GrantedQoS();
       
   115     TInt QoSRank();
       
   116 
       
   117 	TBool ContentionRequested() const 
       
   118 		{
       
   119 		return iContentionRequested;	
       
   120 		}
       
   121 	void SetContentionRequested(TBool aContentionRequested)
       
   122 		{
       
   123 		iContentionRequested = aContentionRequested;
       
   124 		}
       
   125 
       
   126 protected:
       
   127     //-====================================
       
   128     //Construction methods bundle - accessible thru the factory only
       
   129     //-====================================
       
   130     CPDPSubConnectionProvider(ESock::CSubConnectionProviderFactoryBase& aFactory);
       
   131     CPDPSubConnectionProvider(ESock::CSubConnectionProviderFactoryBase& aFactory,
       
   132                                    const MeshMachine::TNodeActivityMap& aActivityMap);
       
   133 	static CPDPSubConnectionProvider* NewL(CPDPSubConnectionProviderFactory& aFactory);
       
   134 	void ConstructL();
       
   135 
       
   136 private:
       
   137 	TTFTInfo GetTftInfoL(CSubConIPAddressInfoParamSet* aParamSet);
       
   138 	TTFTOperationCode GetOperationCodeL(CSubConIPAddressInfoParamSet* aParamSet);
       
   139 	TUint FindPacketFilterIdL(CSubConIPAddressInfoParamSet::TSubConIPAddressInfo aParamInfo);
       
   140 	TUint FindIdOfMatchingParamSetL(CSubConIPAddressInfoParamSet::TSubConIPAddressInfo aParamInfo);
       
   141 	void NewPacketFilterAddedL(CSubConIPAddressInfoParamSet::TSubConIPAddressInfo aParamInfo, TUint aId);
       
   142 	void PacketFilterRemovedL(TUint aId);
       
   143 
       
   144 public:
       
   145     //-====================================
       
   146     //PDP Ctx manipulation
       
   147     //-====================================
       
   148 	TContextId iPDPFsmContextId;
       
   149 	SpudMan::TPdpContextType iContextType; //maintain type of subconnection provider
       
   150     CPdpFsmInterface* iPdpFsmInterface;
       
   151     CPDPDefaultSubConnectionProvider* iDefaultSCPR;
       
   152     TInt iActivityAwaitingResponse;
       
   153     MPDPParamMapper::TQosParameterRelease iParamsRelease;
       
   154 
       
   155     //quite a big structure so kept here to avoid stack overflow.
       
   156     RPacketContext::TDataChannelV2 iTempDataChannelV2;
       
   157 protected:
       
   158     __FLOG_DECLARATION_MEMBER;
       
   159     TInt iLinkUps;
       
   160 
       
   161 private:
       
   162 	// keeps record of assigned Id's for packetFilter
       
   163 	RArray<TUint> iPacketFilterId;
       
   164 	TUint8 iPacketFilterMaskId;
       
   165 	TBool iIsModeGsm;
       
   166 	TBool iContentionRequested; 
       
   167     };
       
   168 
       
   169 class THighestQoSQuery :  public Factories::MFactoryQuery
       
   170 /** Query scanning for the CPDPSubConnectionProvider with the highest QoS as per
       
   171     3GPP TS 23.107 Annex C.
       
   172     Usage note: Use against CPDPSubConnectionProviderFactory::Find, which will
       
   173     always return NULL (the query needs to traverse all the providers). Examine
       
   174     THighestQoSQuery::HighestQoSProvider() after calling Find to get the highest
       
   175     QoS provider.
       
   176 
       
   177 @internalTechnology
       
   178 @released Since 9.5 */
       
   179     {
       
   180     public:
       
   181     THighestQoSQuery(Messages::TNodeId aCtrlProvider)
       
   182     :iCtrlProvider(aCtrlProvider),
       
   183      iHighestQoSProvider(NULL)
       
   184      {}
       
   185 
       
   186     CPDPSubConnectionProvider* HighestQoSProvider()
       
   187         {
       
   188         return iHighestQoSProvider;
       
   189         }
       
   190 
       
   191     protected:
       
   192 	virtual TMatchResult Match(Factories::TFactoryObjectInfo& aObjectInfo);
       
   193 
       
   194 	private:
       
   195 	Messages::TNodeId iCtrlProvider;
       
   196 	CPDPSubConnectionProvider* iHighestQoSProvider;
       
   197     };
       
   198 
       
   199 #endif //SYMBIAN_PDPSPR_H