|
1 // Copyright (c) 2007-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 // sip Connection Provider states |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef SIPCPRSTATES_H_ |
|
24 #define SIPCPRSTATES_H_ |
|
25 |
|
26 #include <comms-infras/ss_log.h> |
|
27 #include <ss_glob.h> |
|
28 #include <comms-infras/corecprstates.h> |
|
29 #include <comms-infras/ss_subconnprov.h> |
|
30 #include <comms-infras/ss_metaconnprov.h> |
|
31 #include <comms-infras/ss_nodemessages.h> |
|
32 #include <comms-infras/corecprstates.h> |
|
33 #include <comms-infras/ss_coreprstates.h> |
|
34 #include "sipprovisioninfo.h" |
|
35 #include "sipcpr.h" |
|
36 |
|
37 enum SipCprSpecificActivities |
|
38 { |
|
39 //This activity handles the ErrorOccurred call back function |
|
40 ECFActivitySipErrorOccurred = ESock::ECFActivityCustom |
|
41 }; |
|
42 |
|
43 namespace SipCprActivities |
|
44 { |
|
45 typedef MeshMachine::TNodeContext<CSipConnectionProvider, CprStates::TContext> TContext; |
|
46 namespace BinderRequest |
|
47 { |
|
48 |
|
49 DECLARE_SMELEMENT_HEADER( TSubConnectionTypeTag, MeshMachine::TStateFork<TContext>, NetStateMachine::MStateFork, TContext ) |
|
50 virtual TInt TransitionTag(); |
|
51 DECLARE_SMELEMENT_FOOTER( TSubConnectionTypeTag ) |
|
52 } |
|
53 } |
|
54 |
|
55 namespace SipCprStates |
|
56 { |
|
57 typedef MeshMachine::TNodeContext<CSipConnectionProvider, CprStates::TContext> TContext; |
|
58 |
|
59 enum { |
|
60 KDeRegister = 1, |
|
61 KRegistered |
|
62 }; |
|
63 |
|
64 |
|
65 //==================================================================================== |
|
66 // |
|
67 // BinderRequest Activity |
|
68 // |
|
69 //=================================================================================== |
|
70 |
|
71 // Provision Activity |
|
72 DECLARE_SMELEMENT_HEADER( TSendProvision, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
73 virtual void DoL(); |
|
74 DECLARE_SMELEMENT_FOOTER( TSendProvision ) |
|
75 |
|
76 |
|
77 //For comms binder request |
|
78 DECLARE_SMELEMENT_HEADER( TIntializeWaitForIncmgParams, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
79 virtual void DoL(); |
|
80 DECLARE_SMELEMENT_FOOTER( TIntializeWaitForIncmgParams ) |
|
81 |
|
82 //For comms binder request |
|
83 DECLARE_SMELEMENT_HEADER(TWaitForIncomingOrUseExisting, MeshMachine::TStateFork<TContext>, NetStateMachine::MStateFork, TContext) |
|
84 virtual TInt TransitionTag(); |
|
85 DECLARE_SMELEMENT_FOOTER(TWaitForIncomingOrUseExisting) |
|
86 |
|
87 //For comms binder request |
|
88 DECLARE_SMELEMENT_HEADER(TAwaitingIncomingConnection, MeshMachine::TState<TContext>, NetStateMachine::MState, TContext) |
|
89 virtual TBool Accept(); |
|
90 DECLARE_SMELEMENT_FOOTER(TAwaitingIncomingConnection ) |
|
91 |
|
92 |
|
93 DECLARE_AGGREGATED_TRANSITION3( |
|
94 TProcessSCPRCreation, |
|
95 CoreNetStates::TAddDataClient, |
|
96 SipCprStates::TSendProvision, |
|
97 PRActivities::CCommsBinderActivity::TStorePendingBinder |
|
98 ) |
|
99 |
|
100 DECLARE_AGGREGATED_TRANSITION2( |
|
101 TProcessWaitForIncmg, |
|
102 SipCprStates::TIntializeWaitForIncmgParams, |
|
103 PRStates::TCreateDataClient |
|
104 ) |
|
105 |
|
106 |
|
107 //=========================================================================================== |
|
108 // |
|
109 // Provision Activity |
|
110 //=========================================================================================== |
|
111 DECLARE_SMELEMENT_HEADER( TStoreProvision, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
112 virtual void DoL(); |
|
113 DECLARE_SMELEMENT_FOOTER( TStoreProvision ) |
|
114 |
|
115 |
|
116 //============================================================================================= |
|
117 // |
|
118 // Stop Activity |
|
119 // |
|
120 //============================================================================================== |
|
121 DECLARE_SMELEMENT_HEADER( TDeRegisterCpr, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
122 virtual void DoL(); |
|
123 DECLARE_SMELEMENT_FOOTER( TDeRegisterCpr ) |
|
124 |
|
125 DECLARE_SMELEMENT_HEADER( TAwaitingDeRegistrationComplete, MeshMachine::TState<TContext>, NetStateMachine::MState, TContext) |
|
126 virtual TBool Accept(); |
|
127 DECLARE_SMELEMENT_FOOTER(TAwaitingDeRegistrationComplete ) |
|
128 |
|
129 DECLARE_SMELEMENT_HEADER(TNoTagOrDeRegister, MeshMachine::TStateFork<TContext>, NetStateMachine::MStateFork, TContext) |
|
130 virtual TInt TransitionTag(); |
|
131 DECLARE_SMELEMENT_FOOTER(TNoTagOrDeRegister) |
|
132 |
|
133 DECLARE_SMELEMENT_HEADER( TSendStopped, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
134 virtual void DoL(); |
|
135 DECLARE_SMELEMENT_FOOTER(TSendStopped) |
|
136 |
|
137 |
|
138 //================================================================= |
|
139 // |
|
140 // SipNoBearer activity |
|
141 // |
|
142 //================================================================= |
|
143 |
|
144 DECLARE_SMELEMENT_HEADER(TAwaitingNoBearer, MeshMachine::TState<TContext>, NetStateMachine::MState, TContext) |
|
145 virtual TBool Accept(); |
|
146 DECLARE_SMELEMENT_FOOTER(TAwaitingNoBearer ) |
|
147 |
|
148 //================================================================= |
|
149 // |
|
150 // SipCprStartActivity |
|
151 // |
|
152 //================================================================= |
|
153 DECLARE_SMELEMENT_HEADER( TNoTagOrRegistered, MeshMachine::TStateFork<TContext>, NetStateMachine::MStateFork, TContext ) |
|
154 virtual TInt TransitionTag(); |
|
155 DECLARE_SMELEMENT_FOOTER( TNoTagOrRegistered ) |
|
156 |
|
157 DECLARE_SMELEMENT_HEADER( TRegisterCpr, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
158 virtual void DoL(); |
|
159 DECLARE_SMELEMENT_FOOTER( TRegisterCpr ) |
|
160 |
|
161 DECLARE_SMELEMENT_HEADER( TAwaitingRegistrationComplete, MeshMachine::TState<TContext>, NetStateMachine::MState, TContext) |
|
162 virtual TBool Accept(); |
|
163 DECLARE_SMELEMENT_FOOTER( TAwaitingRegistrationComplete ) |
|
164 |
|
165 DECLARE_SERIALIZABLE_STATE( |
|
166 TNoTagOrRegisteredBlockedByStop, |
|
167 MeshMachine::TActivityIdMutex<ESock::ECFActivityStop>, |
|
168 SipCprStates::TNoTagOrRegistered |
|
169 ) |
|
170 |
|
171 //================================================================ |
|
172 //Others |
|
173 // |
|
174 //============================================================== |
|
175 |
|
176 DECLARE_SMELEMENT_HEADER( TSetPostedToScpr, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
177 virtual void DoL(); |
|
178 DECLARE_SMELEMENT_FOOTER( TSetPostedToScpr ) |
|
179 |
|
180 } //namespace SipCprStates |
|
181 |
|
182 #endif //SIPCPRSTATES_H_ |
|
183 |