|
1 // Copyright (c) 2006-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 // |
|
15 |
|
16 #include "dummymessages.h" |
|
17 #include "dummynode.h" |
|
18 #include "dummystates.h" |
|
19 #include "dummyactivities.h" |
|
20 |
|
21 using namespace Dummy; |
|
22 using namespace Messages; |
|
23 using namespace MeshMachine; |
|
24 |
|
25 |
|
26 EXPORT_C CTestNodeBase::CTestNodeBase(Factories::CFactoryBase& aFactory, |
|
27 const MeshMachine::TNodeActivityMap& aActivityMap) |
|
28 : AFactoryObject(aFactory), |
|
29 AMMNodeIdBase(aActivityMap) |
|
30 { |
|
31 } |
|
32 |
|
33 EXPORT_C CTestNodeBase::~CTestNodeBase() |
|
34 { |
|
35 } |
|
36 |
|
37 EXPORT_C void CTestNodeBase::Received(TNodeContextBase& aContext) |
|
38 { |
|
39 TNodeSignal::TMessageId noPeerIds[] = { |
|
40 TBindProtocol::TClientJoiningRequest::Id(), |
|
41 TEBase::TError::Id(), |
|
42 TNodeSignal::TMessageId() |
|
43 }; |
|
44 AMMNodeBase::Received(noPeerIds, aContext); |
|
45 AMMNodeBase::PostReceived(aContext); |
|
46 } |
|
47 |
|
48 EXPORT_C void CTestNodeBase::ReceivedL(const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage) |
|
49 { |
|
50 TNodeContext<CTestNodeBase> ctx(*this, aMessage, aSender, aRecipient); |
|
51 CTestNodeBase::Received(ctx); |
|
52 User::LeaveIfError(ctx.iReturn); |
|
53 } |
|
54 |
|
55 |