telephonyprotocols/pdplayer/umts/test/mbufgobblerlayer/src/mbufgobblertiermanager.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 // Tier Manager
       
    15 //   (management plane)
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #include "mbufgobblertiermanager.h"
       
    24 #include "mbufgobblertiermanageractivities.h"
       
    25 #include "mbufgobblerlog.h"
       
    26 #include "mbufgobblertestflags.h"
       
    27 
       
    28 #include <comms-infras/coretiermanageractivities.h>
       
    29 
       
    30 #include "mbufgobblerproviderselector.h"
       
    31 
       
    32 _LIT8(KNodeName, "CMbufGobblerTierManager");
       
    33 
       
    34 CMbufGobblerTierManager* CMbufGobblerTierManager::NewL(ESock::CTierManagerFactoryBase& aFactory)
       
    35 	{
       
    36 	CMbufGobblerTierManager* self = new (ELeave) CMbufGobblerTierManager(aFactory);
       
    37  	CleanupStack::PushL(self);
       
    38  	self->ConstructL();
       
    39  	CleanupStack::Pop(self);
       
    40  	return self;
       
    41 	}
       
    42 
       
    43 CMbufGobblerTierManager::CMbufGobblerTierManager(ESock::CTierManagerFactoryBase& aFactory)                                   
       
    44 :	CCoreTierManager(aFactory,MbufGobblerTMActivities::MbufGobblerTMActivitiesMap::Self())
       
    45 	{
       
    46 	MBUFGOBBLER_LOG_NODE_CREATE(KMbufGobblerTierSubTag, CMbufGobblerTierManager, KNodeName, this->NodeId().Ptr());
       
    47 	}
       
    48 
       
    49 void CMbufGobblerTierManager::ConstructL()
       
    50 	{
       
    51 	CCoreTierManager::ConstructL();
       
    52 	MBUFGOBBLER_TEST_DATA_INIT
       
    53     MBUFGOBBLER_TEST_POINT(KTierUp,KErrNone)
       
    54 	}
       
    55 
       
    56 CMbufGobblerTierManager::~CMbufGobblerTierManager()
       
    57 	{
       
    58 	MBUFGOBBLER_LOG_NODE_DESTROY(KMbufGobblerTierSubTag, CMbufGobblerTierManager, KNodeName, this->NodeId().Ptr());
       
    59 	}
       
    60 
       
    61 ESock::MProviderSelector* CMbufGobblerTierManager::DoCreateProviderSelectorL(const Meta::SMetaData& aSelectionPreferences)
       
    62 	{
       
    63     return CMbufGobblerProviderSelector::NewL(aSelectionPreferences);
       
    64 	}
       
    65 
       
    66 void CMbufGobblerTierManager::ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage)
       
    67 	{
       
    68 	LOGMESSAGE(KMbufGobblerTierSubTag, KNodeName, this, aSender, aRecipient, aMessage);
       
    69 	LOG_NODE_INFO(KMbufGobblerTierSubTag, KNodeName, *this, iClientCount);
       
    70   	MeshMachine::TNodeContext<CMbufGobblerTierManager> ctx(*this, aMessage, aSender, aRecipient);
       
    71    	CCoreTierManager::Received(ctx);
       
    72     User::LeaveIfError(ctx.iReturn);
       
    73 	}
       
    74 
       
    75 
       
    76 
       
    77 
       
    78 
       
    79 
       
    80