telephonyprotocols/pdplayer/src/pdptiermanager.cpp
changeset 36 2e966480abb1
parent 20 244d7c5f118e
child 37 2c74b432a438
equal deleted inserted replaced
23:6b1d113cdff3 36:2e966480abb1
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    16 /**
    16 /**
    17  @file
    17  @file
    18  @internalComponent
    18  @internalComponent
    19 */
    19 */
    20 
    20 
       
    21 
       
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "pdptiermanagerTraces.h"
       
    25 #endif
       
    26 
    21 #include "pdptiermanager.h"
    27 #include "pdptiermanager.h"
    22 #include "mbmsengine.h"
    28 #include "mbmsengine.h"
    23 #include "pdptiermanagerselector.h"
    29 #include "pdptiermanagerselector.h"
    24 #include <comms-infras/ss_log.h>
    30 #include <comms-infras/ss_log.h>
    25 #include <comms-infras/coretiermanagerstates.h>
    31 #include <comms-infras/coretiermanagerstates.h>
    26 #include <comms-infras/coretiermanageractivities.h>
    32 #include <comms-infras/coretiermanageractivities.h>
    27 #include <pcktcs.h>
    33 #include <pcktcs.h>
    28 
    34 
    29 #include "pdpmcpr.h"
       
    30 
       
    31 #ifdef SYMBIAN_TRACE_ENABLE
    35 #ifdef SYMBIAN_TRACE_ENABLE
    32 #define KPDPTierMgrTag KESockMetaConnectionTag
    36 #define KPDPTierMgrTag KESockMetaConnectionTag
    33 _LIT8(KPDPTierMgrSubTag, "pdptiermgr");
       
    34 #endif
    37 #endif
       
    38 
       
    39 #include "pdpmcpr.h"
    35 
    40 
    36 using namespace Messages;
    41 using namespace Messages;
    37 using namespace MeshMachine;
    42 using namespace MeshMachine;
    38 using namespace ESock;
    43 using namespace ESock;
    39 using namespace ConnectionServ;
    44 using namespace ConnectionServ;
   169 	delete iContextMonitors[monitorIndex];
   174 	delete iContextMonitors[monitorIndex];
   170 	iContextMonitors.Remove(monitorIndex);
   175 	iContextMonitors.Remove(monitorIndex);
   171 	}
   176 	}
   172 
   177 
   173 void CPrimaryContextsMonitor::ProcessError(
   178 void CPrimaryContextsMonitor::ProcessError(
   174 	#ifdef _DEBUG
   179     #if (OST_TRACE_CATEGORY_DEBUG)
   175 		TInt aError
   180         TInt aError
   176 	#else	//remove compilation warning in release builds
   181     #else   //remove compilation warning in release builds
   177 		TInt /*aError*/
   182         TInt /*aError*/
   178 	#endif
   183     #endif
   179 	)
   184         )
   180 	{
   185 	{
   181 	__ASSERT_DEBUG(aError != KErrNone, User::Invariant());
   186 	__ASSERT_DEBUG(aError != KErrNone, User::Invariant());
   182 	__FLOG_STATIC1(KPDPTierMgrTag, KPDPTierMgrSubTag, _L("PDP context monitoring error: %d"), aError);
   187 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPRIMARYCONTEXTSMONITOR_PROCESSERROR_1, ("PDP context monitoring error: %d"), aError);
   183 	}
   188 	}
   184 
   189 
   185 void CPrimaryContextsMonitor::RunL()
   190 void CPrimaryContextsMonitor::RunL()
   186 	{
   191 	{
   187 	User::LeaveIfError(iStatus.Int());
   192 	User::LeaveIfError(iStatus.Int());
   435 Create selector for this Tier.
   440 Create selector for this Tier.
   436 @return MProviderSelector*
   441 @return MProviderSelector*
   437 */
   442 */
   438 MProviderSelector* CPDPTierManager::DoCreateProviderSelectorL(const Meta::SMetaData& aSelectionPreferences)
   443 MProviderSelector* CPDPTierManager::DoCreateProviderSelectorL(const Meta::SMetaData& aSelectionPreferences)
   439 	{
   444 	{
   440 	__CFLOG_VAR((KPDPTierMgrTag, KPDPTierMgrSubTag, _L8("CPdpTierManager[%08x]::DoSelectProvider()"), this));
   445 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_DOCREATEPROVIDERSELECTORL_1, "CPdpTierManager[%08x]::DoSelectProvider()", (TUint)this);
   441 	return TPdpSelectorFactory::NewSelectorL(aSelectionPreferences);
   446 	return TPdpSelectorFactory::NewSelectorL(aSelectionPreferences);
   442 	}
   447 	}
   443 
   448 
   444 /**
   449 /**
   445 ConstructL function of CPDPTierManager.
   450 ConstructL function of CPDPTierManager.
   446 This function is used to retrieve tsy name.
   451 This function is used to retrieve tsy name.
   447 @return void
   452 @return void
   448 */
   453 */
   449 void CPDPTierManager::ConstructL()
   454 void CPDPTierManager::ConstructL()
   450 	{
   455 	{
   451 	__CFLOG_VAR((KPDPTierMgrTag, KPDPTierMgrSubTag, _L8("ConstructL::In CPDPTierManager")));
   456 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_CONSTRUCTL_1, "ConstructL::In CPDPTierManager");
   452 	iMBMSEngine = CMBMSEngine::NewL(NodeId(), *this);
   457 	iMBMSEngine = CMBMSEngine::NewL(NodeId(), *this);
   453 	}
   458 	}
   454 
   459 
   455 /**
   460 /**
   456  The PacketServiceAttachedCallbackL is a callback function.
   461  The PacketServiceAttachedCallbackL is a callback function.