|
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 // IPProto Connection Provider implementation |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef IPPROTOCPRSTATES_H_ |
|
24 #define IPPROTOCPRSTATES_H_ |
|
25 |
|
26 #include <comms-infras/corecprstates.h> |
|
27 |
|
28 #include "IPProtoCPR.h" |
|
29 |
|
30 namespace IpProtoCpr |
|
31 { |
|
32 typedef MeshMachine::TNodeContext<CIPProtoConnectionProvider, CprStates::TContext> TContext; |
|
33 //-========================================================= |
|
34 // |
|
35 // States |
|
36 // |
|
37 //-========================================================= |
|
38 typedef MeshMachine::TAcceptErrorState<CoreNetStates::TAwaitingDataClientStarted> TAwaitingDataClientStartedOrError; |
|
39 |
|
40 DECLARE_SMELEMENT_HEADER( TStoreProvision, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext ) |
|
41 virtual void DoL(); |
|
42 DECLARE_SMELEMENT_FOOTER( TStoreProvision ) |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 DECLARE_SMELEMENT_HEADER( TStoreAndFilterDeprecatedAndForwardStateChange, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext ) |
|
50 virtual void DoL(); |
|
51 DECLARE_SMELEMENT_FOOTER( TStoreAndFilterDeprecatedAndForwardStateChange ) |
|
52 |
|
53 DECLARE_SMELEMENT_HEADER( TLinkUp, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext ) |
|
54 virtual void DoL(); |
|
55 DECLARE_SMELEMENT_FOOTER( TLinkUp ) |
|
56 |
|
57 DECLARE_SMELEMENT_HEADER( TLinkDown, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext ) |
|
58 virtual void DoL(); |
|
59 DECLARE_SMELEMENT_FOOTER( TLinkDown ) |
|
60 |
|
61 DECLARE_AGGREGATED_TRANSITION2( |
|
62 TLinkUpAndTStartSelf, |
|
63 CoreNetStates::TStartSelf, |
|
64 IpProtoCpr::TLinkUp |
|
65 ) |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 DECLARE_SMELEMENT_HEADER( TDataClientIsIdle, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext ) |
|
72 virtual void DoL(); |
|
73 DECLARE_SMELEMENT_FOOTER( TDataClientIsIdle ) |
|
74 |
|
75 DECLARE_SMELEMENT_HEADER( TSendStarted, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext ) |
|
76 virtual void DoL(); |
|
77 DECLARE_SMELEMENT_FOOTER( TSendStarted ) |
|
78 |
|
79 DECLARE_SMELEMENT_HEADER( TAwaitingStart, MeshMachine::TState<IpProtoCpr::TContext>, NetStateMachine::MState, IpProtoCpr::TContext) |
|
80 virtual TBool Accept(); |
|
81 DECLARE_SMELEMENT_FOOTER( TAwaitingStart ) |
|
82 |
|
83 DECLARE_SMELEMENT_HEADER( TCleanupStart, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext ) |
|
84 virtual void DoL(); |
|
85 DECLARE_SMELEMENT_FOOTER( TCleanupStart ) |
|
86 |
|
87 DECLARE_SMELEMENT_HEADER( TCheckIfLastControlClientLeaving, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext ) |
|
88 virtual void DoL(); |
|
89 DECLARE_SMELEMENT_FOOTER( TCheckIfLastControlClientLeaving ) |
|
90 |
|
91 DECLARE_SMELEMENT_HEADER(TAwaitingGoneDown, MeshMachine::TState<IpProtoCpr::TContext>, NetStateMachine::MState, IpProtoCpr::TContext) |
|
92 virtual TBool Accept(); |
|
93 DECLARE_SMELEMENT_FOOTER(TAwaitingGoneDown) |
|
94 |
|
95 |
|
96 //-========================================================= |
|
97 // Data monitoring states |
|
98 //-========================================================= |
|
99 DECLARE_SMELEMENT_HEADER(TAwaitingDataMonitoringNotification, MeshMachine::TState<IpProtoCpr::TContext>, NetStateMachine::MState, IpProtoCpr::TContext) |
|
100 virtual TBool Accept(); |
|
101 DECLARE_SMELEMENT_FOOTER(TAwaitingDataMonitoringNotification) |
|
102 |
|
103 DECLARE_SMELEMENT_HEADER(TProcessDataMonitoringNotification, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext) |
|
104 virtual void DoL(); |
|
105 DECLARE_SMELEMENT_FOOTER(TProcessDataMonitoringNotification) |
|
106 |
|
107 //-========================================================= |
|
108 // Open/close route states |
|
109 //-========================================================= |
|
110 DECLARE_SMELEMENT_HEADER(TAwaitingOpenCloseRoute, MeshMachine::TState<IpProtoCpr::TContext>, NetStateMachine::MState, IpProtoCpr::TContext) |
|
111 virtual TBool Accept(); |
|
112 DECLARE_SMELEMENT_FOOTER(TAwaitingOpenCloseRoute) |
|
113 |
|
114 DECLARE_SMELEMENT_HEADER(TDoOpenCloseRoute, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext) |
|
115 virtual void DoL(); |
|
116 DECLARE_SMELEMENT_FOOTER(TDoOpenCloseRoute) |
|
117 |
|
118 //-========================================================= |
|
119 // DataClientStart states |
|
120 //-========================================================= |
|
121 DECLARE_SMELEMENT_HEADER( TSendStopToSelf, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
122 virtual void DoL(); |
|
123 DECLARE_SMELEMENT_FOOTER( TSendStopToSelf ) |
|
124 |
|
125 //-========================================================= |
|
126 // DataClientStatusChange states |
|
127 //-========================================================= |
|
128 DECLARE_SMELEMENT_HEADER(TProcessDataClientStatusChange, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext) |
|
129 virtual void DoL(); |
|
130 DECLARE_SMELEMENT_FOOTER(TProcessDataClientStatusChange) |
|
131 |
|
132 //-========================================================= |
|
133 // ioctl states |
|
134 //-========================================================= |
|
135 DECLARE_SMELEMENT_HEADER(TAwaitingIoctlMessage, MeshMachine::TState<IpProtoCpr::TContext>, NetStateMachine::MState, IpProtoCpr::TContext) |
|
136 virtual TBool Accept(); |
|
137 DECLARE_SMELEMENT_FOOTER(TAwaitingIoctlMessage) |
|
138 |
|
139 DECLARE_SMELEMENT_HEADER(TForwardToDefaultDataClient, MeshMachine::TStateTransition<IpProtoCpr::TContext>, NetStateMachine::MStateTransition, IpProtoCpr::TContext) |
|
140 virtual void DoL(); |
|
141 DECLARE_SMELEMENT_FOOTER(TForwardToDefaultDataClient) |
|
142 |
|
143 } |
|
144 |
|
145 #endif //IPPROTOCPRMESSAGES_H_ |
|
146 |