40 // S60MCprSelectActivity |
40 // S60MCprSelectActivity |
41 // ----------------------------------------------------------------------------- |
41 // ----------------------------------------------------------------------------- |
42 // |
42 // |
43 namespace S60MCprSelectActivity |
43 namespace S60MCprSelectActivity |
44 { |
44 { |
|
45 // Overrides CNodeActivityBase method implementation |
|
46 void CS60SelectActivity::Cancel(MeshMachine::TNodeContextBase& aContext) |
|
47 { |
|
48 S60MCPRLOGSTRING1("S60MCPR<%x>::CS60SelectActivity::Cancel()",(TInt*)&aContext.Node()) |
|
49 __ASSERT_DEBUG(aContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity)); |
|
50 CSelectNextLayerActivity& ac = |
|
51 static_cast<CSelectNextLayerActivity&>( *aContext.iNodeActivity ); |
|
52 |
|
53 if (!ac.iTierManager.IsNull() && ac.iTierManager == PostedToNodeId()) |
|
54 { |
|
55 S60MCPRLOGSTRING1("S60MCPR<%x>::CS60SelectActivity::Cancel() Forwarding TCancel to TM",(TInt*)&aContext.Node()) |
|
56 RClientInterface::OpenPostMessageClose(TNodeCtxId(ActivityId(), iNode.Id()), PostedToNodeId(), TEBase::TCancel().CRef()); |
|
57 SetError( KErrCancel ); |
|
58 } |
|
59 else |
|
60 { |
|
61 CSelectNextLayerActivity::Cancel(aContext); |
|
62 } |
|
63 } |
|
64 |
|
65 MeshMachine::CNodeActivityBase* CS60SelectActivity::NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) |
|
66 { |
|
67 return new(ELeave) CS60SelectActivity( aActivitySig, aNode ); |
|
68 } |
|
69 |
|
70 CS60SelectActivity::CS60SelectActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) |
|
71 : CSelectNextLayerActivity(aActivitySig, aNode) |
|
72 { |
|
73 } |
|
74 |
45 // ----------------------------------------------------------------------------- |
75 // ----------------------------------------------------------------------------- |
46 // TAwaitingSelectNextLayer |
76 // TAwaitingSelectNextLayer |
47 // ----------------------------------------------------------------------------- |
77 // ----------------------------------------------------------------------------- |
48 // |
78 // |
49 DEFINE_SMELEMENT(TAwaitingSelectNextLayer, NetStateMachine::MState, TContext) |
79 DEFINE_SMELEMENT(TAwaitingSelectNextLayer, NetStateMachine::MState, TContext) |
168 */ |
198 */ |
169 TConnAPPref* nextAP = TConnAPPref::NewL(node.PolicyPrefs().IapId()); |
199 TConnAPPref* nextAP = TConnAPPref::NewL(node.PolicyPrefs().IapId()); |
170 CleanupStack::PushL(nextAP); |
200 CleanupStack::PushL(nextAP); |
171 node.ConnPrefList().AppendL(nextAP); |
201 node.ConnPrefList().AppendL(nextAP); |
172 CleanupStack::Pop(); |
202 CleanupStack::Pop(); |
173 /* END OF HACK */ |
203 /* END OF HACK */ |
174 |
|
175 // Attach. 399 attach shouldn't be visible here. |
204 // Attach. 399 attach shouldn't be visible here. |
176 if ( prefs.Scope()&TSelectionPrefs::ESelectFromExisting ) |
205 if ( prefs.Scope()&TSelectionPrefs::ESelectFromExisting ) |
177 { |
206 { |
178 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Attach ",(TInt*)&iContext.Node()) |
207 S60MCPRLOGSTRING1("S60MCPR<%x>::TSelectNextLayer::DoL() Attach ",(TInt*)&iContext.Node()) |
179 TCFSelector::TSimpleSelect msg( prefs ); |
208 TCFSelector::TSimpleSelect msg( prefs ); |
192 TSelectionPrefs newPrefs; |
221 TSelectionPrefs newPrefs; |
193 newPrefs = prefs; |
222 newPrefs = prefs; |
194 newPrefs.SetPrefs( ippprefs ); |
223 newPrefs.SetPrefs( ippprefs ); |
195 TCFSelector::TSimpleSelect msg(newPrefs); |
224 TCFSelector::TSimpleSelect msg(newPrefs); |
196 iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg); |
225 iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg); |
197 } |
226 } |
198 } |
227 } |
199 } |
228 } |
200 |
229 |
201 // ----------------------------------------------------------------------------- |
230 // ----------------------------------------------------------------------------- |
202 // S60MCprSimpleSelectActivity |
231 // S60MCprSimpleSelectActivity |