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