|
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 // IP Connection Provider state declarations. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef IPCPR_STATES_H_INCLUDED |
|
24 #define IPCPR_STATES_H_INCLUDED |
|
25 |
|
26 #define SYMBIAN_NETWORKING_UPS |
|
27 |
|
28 #include <comms-infras/ss_activities.h> |
|
29 #include <comms-infras/corecpr.h> |
|
30 #include <comms-infras/corecprstates.h> |
|
31 |
|
32 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
33 |
|
34 namespace TcpAdaptiveReceiveWindow |
|
35 { |
|
36 const TInt32 KIpBearerInfoUid = 0x2001F96E; |
|
37 const TInt KIpBearerInfoParameterType = 1; |
|
38 |
|
39 const TUint32 KBearerInfo = 1; |
|
40 } |
|
41 |
|
42 using namespace TcpAdaptiveReceiveWindow; |
|
43 |
|
44 class XBearerInfo : public XParameterSet |
|
45 { |
|
46 public: |
|
47 |
|
48 enum |
|
49 { |
|
50 EUid= KIpBearerInfoUid, |
|
51 EId = KIpBearerInfoParameterType, |
|
52 }; |
|
53 IMPORT_C static XBearerInfo* NewL(RParameterFamily aFamily, RParameterFamily::TParameterSetType aType); |
|
54 IMPORT_C static XBearerInfo* NewL(); |
|
55 inline TUint GetBearerType() |
|
56 { |
|
57 return iBearerType; |
|
58 } |
|
59 inline void SetBearerType(TUint aBearerType) |
|
60 { |
|
61 iBearerType = aBearerType; |
|
62 } |
|
63 |
|
64 private: |
|
65 TUint iBearerType; |
|
66 |
|
67 public: |
|
68 DATA_VTABLE |
|
69 }; |
|
70 |
|
71 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
72 |
|
73 class CIPConnectionProvider; |
|
74 |
|
75 namespace IpCprStates |
|
76 { |
|
77 typedef MeshMachine::TNodeContext<CIPConnectionProvider, CprStates::TContext> TContext; |
|
78 |
|
79 DECLARE_SMELEMENT_HEADER( TAwaitingPolicyParams, MeshMachine::TState<TContext>, NetStateMachine::MState, TContext ) |
|
80 virtual TBool Accept(); |
|
81 DECLARE_SMELEMENT_FOOTER( TAwaitingPolicyParams ) |
|
82 |
|
83 DECLARE_SMELEMENT_HEADER( TSendPolicyParams, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
84 virtual void DoL(); |
|
85 DECLARE_SMELEMENT_FOOTER( TSendPolicyParams) |
|
86 // -------- Capability Checks for Starting/Stopping a connection -------- |
|
87 |
|
88 #ifndef SYMBIAN_NETWORKING_UPS |
|
89 |
|
90 DECLARE_SMELEMENT_HEADER( TCheckStartCapabilities, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
91 virtual void DoL(); |
|
92 DECLARE_SMELEMENT_FOOTER( TCheckStartCapabilities) |
|
93 |
|
94 #endif //SYMBIAN_NETWORKING_UPS |
|
95 |
|
96 DECLARE_SMELEMENT_HEADER( TCheckStopCapabilities, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
97 |
|
98 virtual void DoL(); |
|
99 DECLARE_SMELEMENT_FOOTER( TCheckStopCapabilities) |
|
100 |
|
101 // -------- Provider status change handling for subconn events -------- |
|
102 |
|
103 DECLARE_SMELEMENT_HEADER( TAwaitingSubConnDataTransferred, MeshMachine::TState<TContext>, NetStateMachine::MState, TContext) |
|
104 virtual TBool Accept(); |
|
105 DECLARE_SMELEMENT_FOOTER( TAwaitingSubConnDataTransferred) |
|
106 |
|
107 DECLARE_SMELEMENT_HEADER( TProcessSubConnDataTransferred, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
108 virtual void DoL(); |
|
109 DECLARE_SMELEMENT_FOOTER( TProcessSubConnDataTransferred) |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 DECLARE_SMELEMENT_HEADER( TSendInitialSubConnectionOpenedEvent, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
115 virtual void DoL(); |
|
116 DECLARE_SMELEMENT_FOOTER( TSendInitialSubConnectionOpenedEvent) |
|
117 |
|
118 DECLARE_SMELEMENT_HEADER( TSendSubsequentSubConnectionOpenedEvent, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
119 virtual void DoL(); |
|
120 DECLARE_SMELEMENT_FOOTER( TSendSubsequentSubConnectionOpenedEvent) |
|
121 |
|
122 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
123 /*State transition. Will be triggered when there TStarted message is received from the lower layers. |
|
124 This transition will trigger the request/response mechanism to retrieve bearer type from lower layer. |
|
125 New Parameter set is added to Parameter bundle and passed to service Provider from IPCPR. |
|
126 Agent CPR/PDP CPR will update the parameter with the bearer type and send it back to IPCPR. |
|
127 IPCPR will extract the TCP receive window from the lookup table at NetMCPR after it receives the |
|
128 bearer type and send it to IPSCPR(ie. the dataclients) |
|
129 |
|
130 TInitialiseParamsAndSendToSelf will initialise the parameter bundle at IPCPR and send to self. |
|
131 SendToSelf will start a mechanism ato send the bundle to the service providers below. |
|
132 |
|
133 The message is recd. ate the Agent/PDP CPR and the bundle is updated with the bearer type. |
|
134 Respons with retrieved params sends a response to the IPCPR. |
|
135 |
|
136 --------------------------------------- |
|
137 | IPCPR | |
|
138 | | |
|
139 --------------------------------------- |
|
140 /\ \/ /\ |
|
141 | | | |
|
142 |1.TStarted |2.TInitialise |3.TUpdateBundle |
|
143 | |ParamsAnd |AndRespondWith |
|
144 | |SendToSelf |RetrievedParams |
|
145 --------------------------------------- |
|
146 | Agent/PDP | |
|
147 | CPR | |
|
148 --------------------------------------- |
|
149 |
|
150 */ |
|
151 |
|
152 //State Transition to Update NetMCPR after bearer type is obtained |
|
153 DECLARE_SMELEMENT_HEADER(TUpdateProvisionConfigAtStartup, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
154 virtual void DoL(); |
|
155 DECLARE_SMELEMENT_FOOTER(TUpdateProvisionConfigAtStartup) |
|
156 |
|
157 //State Transition which will trigger message to data clients. |
|
158 DECLARE_SMELEMENT_HEADER(TSendTransportNotificationToDataClients, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
159 virtual void DoL(); |
|
160 DECLARE_SMELEMENT_FOOTER(TSendTransportNotificationToDataClients) |
|
161 |
|
162 //State transition to update bearer info after it is recd in modulation change |
|
163 DECLARE_SMELEMENT_HEADER(TUpdateProvisionConfigAtModulation, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
164 virtual void DoL(); |
|
165 DECLARE_SMELEMENT_FOOTER(TUpdateProvisionConfigAtModulation) |
|
166 |
|
167 //State Transition to initialise parameter bundle and send to self |
|
168 DECLARE_SMELEMENT_HEADER(TInitialiseParams, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
169 virtual void DoL(); |
|
170 DECLARE_SMELEMENT_FOOTER(TInitialiseParams) |
|
171 |
|
172 DECLARE_SMELEMENT_HEADER(TSendParamsToSelf, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
173 virtual void DoL(); |
|
174 DECLARE_SMELEMENT_FOOTER(TSendParamsToSelf) |
|
175 |
|
176 DECLARE_AGGREGATED_TRANSITION2( |
|
177 TInitialiseParamsAndSendToSelf, |
|
178 TInitialiseParams, |
|
179 TSendParamsToSelf |
|
180 ) |
|
181 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
182 |
|
183 } // IpCprStates |
|
184 |
|
185 #endif |
|
186 // IPCPR_STATES_H_INCLUDED |