|
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 // IPProto MCPR Activities |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 |
|
24 #include "ipprotomcpr.h" |
|
25 #include <coremcpractivities.h> |
|
26 #include <coremcprstates.h> |
|
27 #include <comms-infras/ss_nodeactivities.h> |
|
28 #include <comms-infras/ss_nodemessages.h> |
|
29 #include <comms-infras/corecpractivities.h> |
|
30 #include "IPProtoMCPRActivities.h" |
|
31 |
|
32 using namespace ESock; |
|
33 using namespace NetStateMachine; |
|
34 using namespace MCprActivities; |
|
35 |
|
36 namespace IPProtoMCprSelectActivity |
|
37 { |
|
38 DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivitySelectNextLayer, IPProtoMCprSelect, TCFMessage::TSelectNextLayer, CSelectNextLayerActivity::NewL) |
|
39 //Reply from TAwaitingSelectNextLayer if no choices, otherwise accept |
|
40 FIRST_NODEACTIVITY_ENTRY(MCprStates::TAwaitingSelectNextLayer, TNoTagOrPermissionDenied) |
|
41 THROUGH_NODEACTIVITY_ENTRY(KNoTag, TMaybeLockIap, CoreStates::TNoTag) |
|
42 THROUGH_NODEACTIVITY_ENTRY(KNoTag, CSelectNextLayerActivity::TProcessSimpleSelectionPolicy, MCprStates::TSelectedProvider) |
|
43 //Start the selection main loop |
|
44 NODEACTIVITY_ENTRY(MCprStates::KSelectedProvider, CSelectNextLayerActivity::TFindOrCreateTierManager, MCprStates::TAwaitingTierManagerCreated, CoreStates::TNoTag) |
|
45 //Select next provider and enter the selection internal loop if provider received. Break if SelectComplete(NULL). |
|
46 NODEACTIVITY_ENTRY(KNoTag, CSelectNextLayerActivity::TSelectNextLayer, MCprStates::TAwaitingSelectComplete, CSelectNextLayerActivity::TNoTagOrSelectedProviderIsNull) |
|
47 //Break the selection internal loop if SelectComplete(NULL), otherwise stay in this tripple |
|
48 NODEACTIVITY_ENTRY(KNoTag, MCprStates::TJoinServiceProviderAndSendSelectComplete, MCprStates::TAwaitingSelectComplete, CSelectNextLayerActivity::TNoTagBackwardsOrSelectedProviderIsNull) |
|
49 //Break the selection main loop if no more choices, otherwise go back again |
|
50 THROUGH_NODEACTIVITY_ENTRY(MCprStates::KSelectedProviderIsNull, CoreStates::TDoNothing, CSelectNextLayerActivity::TNoTagOrSelectedProviderBackward) |
|
51 //Finish the activity |
|
52 |
|
53 LAST_NODEACTIVITY_ENTRY(KNoTag, MCprStates::TSendFinalSelectComplete) |
|
54 LAST_NODEACTIVITY_ENTRY(KPermissionDenied, CoreStates::TRaiseActivityError) |
|
55 NODEACTIVITY_END() |
|
56 } |
|
57 |