|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: S60 IP TM implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 @file s60tiermanager.cpp |
|
20 S60 IP TM implementation |
|
21 */ |
|
22 |
|
23 #define SYMBIAN_NETWORKING_UPS |
|
24 |
|
25 #include <comms-infras/ss_log.h> |
|
26 #include <comms-infras/coretiermanagerstates.h> |
|
27 #include <comms-infras/coretiermanageractivities.h> |
|
28 |
|
29 #include "s60tiermanager.h" |
|
30 #include "s60tiermanagerselector.h" |
|
31 #include "s60tmactivities.h" |
|
32 |
|
33 #ifdef SYMBIAN_TRACE_ENABLE |
|
34 #define KS60TierMgrTag KESockMetaConnectionTag |
|
35 // _LIT8(KS60TierMgrSubTag, "iptiermgr"); |
|
36 #endif |
|
37 |
|
38 using namespace Messages; |
|
39 using namespace MeshMachine; |
|
40 using namespace ESock; |
|
41 using namespace NetStateMachine; |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CS60TierManager::NewL |
|
45 // ----------------------------------------------------------------------------- |
|
46 // |
|
47 CS60TierManager* CS60TierManager::NewL( ESock::CTierManagerFactoryBase& aFactory ) |
|
48 { |
|
49 return new (ELeave) CS60TierManager( aFactory, |
|
50 S60TierManagerActivities::S60TierManagerMap::Self() ); |
|
51 } |
|
52 |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CS60TierManager::CS60TierManager |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 CS60TierManager::CS60TierManager( ESock::CTierManagerFactoryBase& aFactory, |
|
59 const MeshMachine::TNodeActivityMap& aActivityMap ) |
|
60 : CCoreTierManager( aFactory, aActivityMap ) |
|
61 { |
|
62 LOG_NODE_CREATE(KS60TierMgrTag, CS60TierManager); |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CS60TierManager::~CS60TierManager |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 CS60TierManager::~CS60TierManager() |
|
70 { |
|
71 LOG_NODE_DESTROY(KS60TierMgrTag, CS60TierManager); |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CS60TierManager::DoCreateProviderSelectorL |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 MProviderSelector* CS60TierManager::DoCreateProviderSelectorL( const Meta::SMetaData& aSelectionPreferences ) |
|
79 { |
|
80 return TS60ProviderSelectorFactory::NewSelectorL( aSelectionPreferences ); |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CS60TierManager::ReceivedL |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 void CS60TierManager::ReceivedL( const TRuntimeCtxId& aSender, |
|
88 const TNodeId& aRecipient, |
|
89 TSignatureBase& aMessage ) |
|
90 { |
|
91 TNodeContext<CS60TierManager> ctx( *this, aMessage, aSender, aRecipient ); |
|
92 CCoreTierManager::Received( ctx ); |
|
93 User::LeaveIfError( ctx.iReturn ); |
|
94 } |