commsfwsupport/commselements/testing/dummynodes/src/node1.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     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 <dummystates.h>
       
    17 #include <dummyactivities.h>
       
    18 #include "Node1Factory.h"
       
    19 #include "Node1.h"
       
    20 
       
    21 using namespace Messages;
       
    22 using namespace Dummy;
       
    23 
       
    24 #ifdef SYMBIAN_TRACE_ENABLE
       
    25 	_LIT8(KNode1Tag, "Node1");
       
    26 #endif
       
    27 
       
    28 //-=========================================================
       
    29 //
       
    30 // CNode1 methods
       
    31 //
       
    32 //-=========================================================
       
    33 CNode1* CNode1::NewL(CNode1Factory& aFactory)
       
    34     {
       
    35     CNode1* provider = new (ELeave) CNode1(aFactory);
       
    36     CleanupStack::PushL(provider);
       
    37     provider->ConstructL();
       
    38     CleanupStack::Pop(provider);
       
    39 	return provider;
       
    40     }
       
    41 
       
    42 CNode1::CNode1(CNode1Factory& aFactory)
       
    43 :	CTestNodeBase(aFactory, DummyActivities::dummyActivities::Self())
       
    44     {
       
    45     NM_LOG_NODE_CREATE(KNode1Tag, CNode1);
       
    46     }
       
    47 
       
    48 CNode1::~CNode1()
       
    49     {
       
    50     NM_LOG_NODE_DESTROY(KNode1Tag, CNode1);
       
    51     }
       
    52 
       
    53 void CNode1::ReceivedL(const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage)
       
    54 	{
       
    55 	CTestNodeBase::ReceivedL(aSender, aRecipient, aMessage);
       
    56 	}
       
    57 
       
    58 TUid CNode1::ServiceProviderUid() const
       
    59 	{
       
    60 	//This will normally would be read from a DB..
       
    61 	//In this case we hardcoded it to CNode2 UID
       
    62 	return TUid::Uid(0x10285A81);
       
    63 	}
       
    64