telephonyprotocols/pdplayer/umts/test/mbufgobblerlayer/src/mbufgobblerconnprovider.cpp
branchRCL_3
changeset 82 042fd2753b8f
equal deleted inserted replaced
74:9200f38b1324 82:042fd2753b8f
       
     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 // Connection Provider
       
    15 //  (control plane)
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #include <comms-infras/ss_connprov.h>
       
    24 
       
    25 #include "mbufgobblerconnprovider.h"
       
    26 #include "mbufgobblerconnprovideractivities.h"
       
    27 #include "mbufgobblerlog.h"
       
    28 #include "mbufgobblertestflags.h"
       
    29 
       
    30 using namespace MbufGobblerCprActivities;
       
    31 
       
    32 _LIT8(KNodeName, "CMbufGobblerConnProvider");
       
    33 
       
    34 CMbufGobblerConnProvider* CMbufGobblerConnProvider::NewL(ESock::CConnectionProviderFactoryBase& aFactory)
       
    35     {
       
    36     CMbufGobblerConnProvider* prov = new (ELeave) CMbufGobblerConnProvider(aFactory);
       
    37     CleanupStack::PushL(prov);
       
    38     prov->ConstructL();
       
    39     CleanupStack::Pop(prov);
       
    40     return prov;
       
    41     }
       
    42 
       
    43 CMbufGobblerConnProvider::CMbufGobblerConnProvider(ESock::CConnectionProviderFactoryBase& aFactory)
       
    44 :  CCoreConnectionProvider(aFactory, MbufGobblerCprActivities::MbufGobblerCprActivitiesMap::Self())
       
    45 	{
       
    46 	MBUFGOBBLER_LOG_NODE_CREATE(KMbufGobblerCprSubTag, CMbufGobblerConnProvider, KNodeName, this->NodeId().Ptr());
       
    47 	}
       
    48 
       
    49 
       
    50 
       
    51 void CMbufGobblerConnProvider::ConstructL()
       
    52 	{
       
    53 	CCoreConnectionProvider::ConstructL();
       
    54 	MBUFGOBBLER_TEST_DATA_INIT
       
    55     MBUFGOBBLER_TEST_POINT(KCPrUp,KErrNone)
       
    56 	}
       
    57 
       
    58 CMbufGobblerConnProvider::~CMbufGobblerConnProvider()
       
    59     {
       
    60     MBUFGOBBLER_LOG_NODE_DESTROY(KMbufGobblerCprSubTag, CMbufGobblerConnProvider, KNodeName, this->NodeId().Ptr());
       
    61     }
       
    62 
       
    63 void CMbufGobblerConnProvider::ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage)
       
    64 	{
       
    65 		
       
    66 	//NODELOOKUP::RPrintRealmAndMsgInfo(_L8("CVccConnectionProvider::ReceivedL"), realm, msgId, activityid, aCFMessage.iSender.Printable());
       
    67 	LOGMESSAGE(KMbufGobblerCprSubTag, KNodeName, this, aSender, aRecipient, aMessage);
       
    68 	LOG_NODE_INFO(KMbufGobblerCprSubTag, KNodeName, *this, iClientCount);
       
    69 
       
    70 	MeshMachine::TNodeContext<CMbufGobblerConnProvider> ctx(*this, aMessage, aSender, aRecipient);
       
    71 	Received(ctx);
       
    72 	User::LeaveIfError(ctx.iReturn);
       
    73 	}
       
    74