|
1 /** |
|
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file PDPFSM.H |
|
22 @internalComponent |
|
23 */ |
|
24 |
|
25 #ifndef PDPFSM_H |
|
26 #define PDPFSM_H |
|
27 |
|
28 #include <networking/pdpdef.h> |
|
29 #include "pdpfsmnmspace.h" |
|
30 |
|
31 class CPdpFsmFactory; |
|
32 |
|
33 namespace SpudMan |
|
34 { |
|
35 enum SpudManGuQoSSignal |
|
36 { |
|
37 EContextStart = 0x80, |
|
38 EContextCreate, |
|
39 EContextDelete, |
|
40 EContextActivate, |
|
41 ERegisterEventHandler, |
|
42 EContextSetEvents, |
|
43 EContextQoSSet, |
|
44 EContextModifyActive, |
|
45 EContextTFTModify, |
|
46 ENifSetDefaultQoS, |
|
47 EStartupPrimaryContextCreation, |
|
48 EMbmsSessionUpdate, |
|
49 EMbmsParameterUpdate, |
|
50 |
|
51 // sentinal |
|
52 ESpudManGuQoSSignalSentinal |
|
53 }; |
|
54 |
|
55 enum SpudManSignal |
|
56 { |
|
57 ESetDefaultQoS = ESpudManGuQoSSignalSentinal, |
|
58 ECreatePrimaryPDPContext, |
|
59 ECreateSecondaryPDPContext, |
|
60 ESuspend, |
|
61 EResume, |
|
62 E1ryPdpActivate, |
|
63 ECancelContextCreate, |
|
64 ECreateMbmsPDPContext, |
|
65 |
|
66 EGetNegQoS, |
|
67 |
|
68 // sentinal |
|
69 ESpudManSignalSentinal |
|
70 }; |
|
71 enum TPdpContextType |
|
72 { |
|
73 ENone, |
|
74 EPrimary, |
|
75 ESecondary, |
|
76 EMbms |
|
77 }; |
|
78 |
|
79 |
|
80 } |
|
81 |
|
82 |
|
83 class MPdpFsmEventHandler |
|
84 /** |
|
85 Callback interface for PDPFsm to raise events. |
|
86 Ignore Spud in the name. It's legacy artifact kept for |
|
87 the old code to work. |
|
88 */ |
|
89 { |
|
90 public: |
|
91 virtual void Event(TInt aEvent, TInt aParam) = 0; |
|
92 }; |
|
93 |
|
94 |
|
95 class CPDPDefaultSubConnectionProvider; |
|
96 class CPdpFsmInterface |
|
97 /** |
|
98 * PDPSCPR implementation of the MPdpFsmInterface |
|
99 * |
|
100 * @internalComponent |
|
101 */ |
|
102 { |
|
103 public: |
|
104 //-========================================================= |
|
105 // custom methods |
|
106 //-========================================================= |
|
107 CPdpFsmInterface(CPDPDefaultSubConnectionProvider& aOwner); |
|
108 virtual ~CPdpFsmInterface(); |
|
109 |
|
110 //-========================================================= |
|
111 // MPdpFsmInterface methods |
|
112 //-========================================================= |
|
113 virtual void NewL(const TName& aName, TInt aUmtsRelease); |
|
114 void Open(); |
|
115 void Close(); |
|
116 |
|
117 TContextId NewFsmContextL(MPdpFsmEventHandler& aPdpFsmEventHandler, SpudMan::TPdpContextType aContextType); |
|
118 void DeleteFsmContext(const TContextId aPdpId); |
|
119 TBool FsmContextExists(const TContextId aPdpId); |
|
120 virtual TInt Input (const TContextId aPdpId, const TInt aOperation,const TInt aParam=KErrNone); |
|
121 |
|
122 virtual TInt Set(const TContextId aPdpId,const TTFTInfo& aParam); |
|
123 virtual TInt Set(const TContextId aPdpId,const TTFTOperationCode& aParam); |
|
124 virtual TInt Set(const TContextId aPdpId,const RPacketContext::TDataChannelV2& aParam); |
|
125 virtual TInt Set(TContextId aPdpId, const TPacketDataConfigBase& aParam); |
|
126 virtual TInt Set(const TContextId aPdpId,const RPacketContext::TContextStatus& aParam); |
|
127 virtual TInt Set(const TContextId aPdpId,const RPacketMbmsContext::TContextConfigMbmsV1& aParam); |
|
128 virtual void Set(const TContextId aPdpId,MPdpFsmEventHandler& aPdpFsmEventHandler); |
|
129 virtual TInt Set(const TContextId aPdpId,const TSessionOperatioInfo& aParam); |
|
130 |
|
131 virtual TInt Get(const TContextId aPdpId,TTFTInfo& aParam) const; |
|
132 virtual TInt Get(const TContextId aPdpId,TTFTOperationCode& aParam) const; |
|
133 virtual TInt Get(const TContextId aPdpId,RPacketContext::TDataChannelV2& aParam) const; |
|
134 virtual TInt Get(TContextId aPdpId, TPacketDataConfigBase& aParam) const; |
|
135 virtual TInt Get(const TContextId aPdpId,RPacketContext::TContextStatus& aParam) const; |
|
136 virtual TInt Get(TContextId aPdpId, RPacketMbmsContext::TContextConfigMbmsV1& aParam) const; |
|
137 virtual TInt Get(TContextId aPdpId, TSessionOperatioInfo& aParam) const; |
|
138 |
|
139 virtual TInt Set(TContextId aPdpId,const RPacketQoS::TQoSR5Requested& aParam); |
|
140 virtual TInt Set(TContextId aPdpId,const RPacketQoS::TQoSR5Negotiated& aParam); |
|
141 virtual TInt Get(TContextId aPdpId,RPacketQoS::TQoSR5Requested& aParam) const; |
|
142 virtual TInt Get(TContextId aPdpId,RPacketQoS::TQoSR5Negotiated& aParam) const; |
|
143 |
|
144 virtual void Set(const RPacketService::TStatus aParam); // applies to all contexts |
|
145 virtual void Get(RPacketService::TStatus& aParam);// applies to all contexts |
|
146 |
|
147 virtual const TName& TsyName(void); |
|
148 |
|
149 inline TInt UmtsRelease() |
|
150 { |
|
151 return iUmtsRelease; |
|
152 } |
|
153 |
|
154 protected: |
|
155 private: |
|
156 // DO NOT provide implementations to these methods: Copying this object should be disabled |
|
157 CPdpFsmInterface(CPdpFsmInterface&); |
|
158 CPdpFsmInterface& operator= (CPdpFsmInterface& aInput); |
|
159 |
|
160 public: |
|
161 protected: |
|
162 private: |
|
163 // FSM Factory - churns out FSMs |
|
164 CPdpFsmFactory * iPdpFsmFactory; |
|
165 CPDPDefaultSubConnectionProvider& iDefaultSubConnProvd; |
|
166 RPacketService::TStatus iNetworkStatus; |
|
167 TInt iRefCount; |
|
168 TInt iUmtsRelease; |
|
169 }; |
|
170 |
|
171 |
|
172 #endif |
|
173 // PDPFSM_H |