|
1 // Copyright (c) 2010 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 // Sub Connection Provider |
|
15 // (control plane) |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #include "mbufgobblersubconnprovider.h" |
|
24 #include "mbufgobblersubconnprovideractivities.h" |
|
25 #include "mbufgobblerlog.h" |
|
26 #include "mbufgobblertestflags.h" |
|
27 |
|
28 using namespace MbufGobblerSCprActivities; |
|
29 |
|
30 _LIT8(KNodeName, "CMbufGobblerSubconnProvider"); |
|
31 |
|
32 CMbufGobblerSubconnProvider* CMbufGobblerSubconnProvider::NewL(ESock::CSubConnectionProviderFactoryBase& aFactory) |
|
33 { |
|
34 CMbufGobblerSubconnProvider* prov = new (ELeave) CMbufGobblerSubconnProvider(aFactory); |
|
35 CleanupStack::PushL(prov); |
|
36 prov->ConstructL(); |
|
37 CleanupStack::Pop(prov); |
|
38 return prov; |
|
39 } |
|
40 |
|
41 CMbufGobblerSubconnProvider::CMbufGobblerSubconnProvider(ESock::CSubConnectionProviderFactoryBase& aFactory) |
|
42 : CCoreSubConnectionProvider(aFactory, MbufGobblerSCprActivities::MbufGobblerSCprActivitiesMap::Self()) |
|
43 { |
|
44 MBUFGOBBLER_LOG_NODE_CREATE(KMbufGobblerScprSubTag, CMbufGobblerSubconnProvider, KNodeName, this->NodeId().Ptr()); |
|
45 } |
|
46 |
|
47 |
|
48 |
|
49 void CMbufGobblerSubconnProvider::ConstructL() |
|
50 { |
|
51 CCoreSubConnectionProvider::ConstructL(); |
|
52 MBUFGOBBLER_TEST_DATA_INIT |
|
53 MBUFGOBBLER_TEST_POINT(KSCPrUp,KErrNone) |
|
54 } |
|
55 |
|
56 CMbufGobblerSubconnProvider::~CMbufGobblerSubconnProvider() |
|
57 { |
|
58 MBUFGOBBLER_LOG_NODE_DESTROY(KMbufGobblerScprSubTag, CMbufGobblerSubconnProvider, KNodeName, this->NodeId().Ptr()); |
|
59 } |
|
60 |
|
61 void CMbufGobblerSubconnProvider::ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage) |
|
62 { |
|
63 LOGMESSAGE(KMbufGobblerScprSubTag, KNodeName, this, aSender, aRecipient, aMessage); |
|
64 LOG_NODE_INFO(KMbufGobblerScprSubTag, KNodeName, *this, iClientCount); |
|
65 MeshMachine::TNodeContext<CMbufGobblerSubconnProvider> ctx(*this, aMessage, aSender, aRecipient); |
|
66 Received(ctx); |
|
67 User::LeaveIfError(ctx.iReturn); |
|
68 } |