24
|
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 |
// 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 |
|
|
33 |
#include "tpdpstates.h"
|
|
34 |
|
|
35 |
class CPdpFsmFactory;
|
|
36 |
class RPacketQoS;
|
|
37 |
class TQoSR99_R4Requested;
|
|
38 |
class TQoSR99_R4Negotiated;
|
|
39 |
|
|
40 |
|
|
41 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
42 |
class TQoSR5Requested;
|
|
43 |
class TQoSR5Negotiated;
|
|
44 |
#endif
|
|
45 |
// SYMBIAN_NETWORKING_UMTSR5
|
|
46 |
|
|
47 |
class TFTInfo;
|
|
48 |
class TFTOperationCode;
|
|
49 |
|
|
50 |
class CPdpFsm : public CBase
|
|
51 |
{
|
|
52 |
friend class TPdpState;
|
|
53 |
friend class TPdpStateInitialised;
|
|
54 |
friend class TPdpStateOpeningPhone;
|
|
55 |
friend class TPdpStateCreatingPrimary;
|
|
56 |
friend class TPdpStateActivatingPrimary;
|
|
57 |
friend class TPdpStateCreatingSecondary;
|
|
58 |
friend class TPdpStateCreatedSecondary;
|
|
59 |
friend class TPdpStateSettingQoS;
|
|
60 |
friend class TPdpStateSettingTFT;
|
|
61 |
friend class TPdpStateActivatingSecondary;
|
|
62 |
friend class TPdpStateOpen;
|
|
63 |
friend class TPdpStateChangingQoS;
|
|
64 |
friend class TPdpStateChangingTFT;
|
|
65 |
friend class TPdpStateModifyingActive;
|
|
66 |
friend class TPdpStateSuspended;
|
|
67 |
friend class TPdpStateClosing;
|
|
68 |
friend class TPdpStateStopping;
|
|
69 |
|
|
70 |
public:
|
|
71 |
CPdpFsm();
|
|
72 |
~CPdpFsm();
|
|
73 |
|
|
74 |
TInt Input (const TInt aOperation, const TInt aParam);
|
|
75 |
|
|
76 |
void Get(RPacketQoS::TQoSR99_R4Requested& aParam);
|
|
77 |
void Get(RPacketQoS::TQoSR99_R4Negotiated& aParam);
|
|
78 |
|
|
79 |
|
|
80 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
81 |
void Get(RPacketQoS::TQoSR5Requested& aParam);
|
|
82 |
void Get(RPacketQoS::TQoSR5Negotiated& aParam);
|
|
83 |
#endif
|
|
84 |
// SYMBIAN_NETWORKING_UMTSR5
|
|
85 |
|
|
86 |
void Get(TTFTInfo& aParam);
|
|
87 |
void Get(TTFTOperationCode& aParam);
|
|
88 |
void Get(RPacketContext::TDataChannelV2& aParam);
|
|
89 |
void Get(RPacketContext::TContextConfigGPRS& aParam);
|
|
90 |
void Get(RPacketContext::TContextStatus& aParam);
|
|
91 |
|
|
92 |
void Set(const RPacketQoS::TQoSR99_R4Requested& aParam);
|
|
93 |
void Set(const RPacketQoS::TQoSR99_R4Negotiated& aParam);
|
|
94 |
|
|
95 |
|
|
96 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
97 |
void Set(const RPacketQoS::TQoSR5Requested& aParam);
|
|
98 |
void Set(const RPacketQoS::TQoSR5Negotiated& aParam);
|
|
99 |
#endif
|
|
100 |
// SYMBIAN_NETWORKING_UMTSR5
|
|
101 |
|
|
102 |
void Set(const TTFTInfo& aParam);
|
|
103 |
void Set(const TTFTOperationCode& aParam);
|
|
104 |
void Set(const RPacketContext::TDataChannelV2& aParam);
|
|
105 |
void Set(const RPacketContext::TContextConfigGPRS& aParam);
|
|
106 |
|
|
107 |
void Set(const RPacketContext::TContextStatus& aParam);
|
|
108 |
|
|
109 |
void InitL (TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput);
|
|
110 |
|
|
111 |
void EtelInput (EtelDriver::TEtelInput aOperation);
|
|
112 |
void EtelCancel (void);
|
|
113 |
void SpudInput (TInt aNotification, TInt aParam);
|
|
114 |
void GetLastErrorCause (TInt& aLastErrorCause);
|
|
115 |
|
|
116 |
protected:
|
|
117 |
private:
|
|
118 |
void ChangeStateToInitialised(void);
|
|
119 |
void ChangeStateToOpeningPhone(void);
|
|
120 |
void ChangeStateToCreatingPrimary(void);
|
|
121 |
void ChangeStateToActivatingPrimary(void);
|
|
122 |
void ChangeStateToCreatingSecondary(void);
|
|
123 |
void ChangeStateToCreatedSecondary(void);
|
|
124 |
void ChangeStateToSettingQoS(void);
|
|
125 |
void ChangeStateToSettingTFT(void);
|
|
126 |
void ChangeStateToActivatingSecondary(void);
|
|
127 |
void ChangeStateToOpen(void);
|
|
128 |
void ChangeStateToChangingQoS(void);
|
|
129 |
void ChangeStateToChangingTFT(void);
|
|
130 |
void ChangeStateToModifingActive(void);
|
|
131 |
void ChangeStateToSuspended(void);
|
|
132 |
void ChangeStateToClosing(void);
|
|
133 |
void ChangeStateToStopping(void);
|
|
134 |
|
|
135 |
|
|
136 |
public:
|
|
137 |
protected:
|
|
138 |
private:
|
|
139 |
|
|
140 |
// local data cache for this context
|
|
141 |
RPacketQoS::TQoSR99_R4Requested iQoSReq;
|
|
142 |
RPacketQoS::TQoSR99_R4Negotiated iQoSNeg;
|
|
143 |
|
|
144 |
|
|
145 |
#ifdef SYMBIAN_NETWORKING_UMTSR5
|
|
146 |
RPacketQoS::TQoSR5Requested iQoSR5Req;
|
|
147 |
RPacketQoS::TQoSR5Negotiated iQoSR5Neg;
|
|
148 |
#endif
|
|
149 |
// SYMBIAN_NETWORKING_UMTSR5
|
|
150 |
|
|
151 |
RPacketContext::TDataChannelV2 iDataChannelV2;
|
|
152 |
RPacketContext::TContextStatus iContextStatus;
|
|
153 |
TTFTInfo iTFT;
|
|
154 |
TTFTOperationCode iTFTOperationCode;
|
|
155 |
RPacketContext::TContextConfigGPRS iGPRS;
|
|
156 |
|
|
157 |
CPdpFsmFactory * iPdpFsmFactory; // need stuff from factory
|
|
158 |
REtelDriverInput * iEtelDriverInput;
|
|
159 |
|
|
160 |
TPdpState * iState; // current state
|
|
161 |
|
|
162 |
TContextId iPdpId; // our instance PDP context id - fixed when allocateed
|
|
163 |
|
|
164 |
enum TContextType
|
|
165 |
{
|
|
166 |
ENone,
|
|
167 |
EPrimary,
|
|
168 |
ESecondary
|
|
169 |
} iContextType;
|
|
170 |
|
|
171 |
|
|
172 |
};
|
|
173 |
|
|
174 |
|
|
175 |
|
|
176 |
#endif // CPDPFSM_H
|
|
177 |
|
|
178 |
|
|
179 |
|