telephonyprotocols/pdplayer/src/PDPCPR.cpp
branchRCL_3
changeset 60 1ac40e087278
parent 0 3553901f7fa8
child 65 630d2f34d719
equal deleted inserted replaced
47:8b9e023e329f 60:1ac40e087278
     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".
    29 #include <comms-infras/corescprstates.h>
    29 #include <comms-infras/corescprstates.h>
    30 #include <elements/mm_context.h>
    30 #include <elements/mm_context.h>
    31 #include <etelmm.h>
    31 #include <etelmm.h>
    32 #include <etelpckt.h>
    32 #include <etelpckt.h>
    33 #include <comms-infras/ss_metaconnprov.h>
    33 #include <comms-infras/ss_metaconnprov.h>
    34 #include "pdpprovision.h"
    34 #include "PDPProvision.h"
    35 #include <etel.h>
    35 #include <etel.h>
    36 #include <networking/cfbearers.h>
    36 #include <networking/cfbearers.h>
    37 #include "pdpcpravailabilitylistener.h"
    37 #include "pdpcpravailabilitylistener.h"
    38 #include <comms-infras/ss_nodemessages.h>
    38 #include <comms-infras/ss_nodemessages.h>
    39 #include <networking/ipcpr_states.h>
    39 #include <networking/ipcpr_states.h>
    42 #include <cs_genevent.h>
    42 #include <cs_genevent.h>
    43 #include <networking/etelbearers.h>
    43 #include <networking/etelbearers.h>
    44 
    44 
    45 using namespace ESock;
    45 using namespace ESock;
    46 
    46 
    47 
       
    48 //-=========================================================
    47 //-=========================================================
    49 //
    48 //
    50 // CPDPConnectionProvider methods
    49 // CPDPConnectionProvider methods
    51 //
    50 //
    52 //-=========================================================	
    51 //-=========================================================	
    53 
       
    54 //We reserve space for two preallocated activities that may start concurrently on the CPR
       
    55 //node: destroy and data client stop.
       
    56 static const TUint KDefaultMaxPreallocatedActivityCount = 2;
       
    57 static const TUint KMaxPreallocatedActivitySize = sizeof(MeshMachine::CNodeRetryParallelActivity) + sizeof(MeshMachine::APreallocatedOriginators<4>);
       
    58 static const TUint KPDPCPRPreallocatedActivityBufferSize = KDefaultMaxPreallocatedActivityCount * KMaxPreallocatedActivitySize;
       
    59 
    52 
    60 namespace PDPCprLinkCharacteristicActivity
    53 namespace PDPCprLinkCharacteristicActivity
    61 {
    54 {
    62 DECLARE_DEFINE_NODEACTIVITY(ECFActivityParamRequest, PDPCprLinkCharacteristic, TCFScpr::TGetParamsRequest)
    55 DECLARE_DEFINE_NODEACTIVITY(ECFActivityParamRequest, PDPCprLinkCharacteristic, TCFScpr::TGetParamsRequest)
    63     NODEACTIVITY_ENTRY(MeshMachine::KNoTag, PDPCprStates::TUpdateBundleAndRespondWithRetrievedParams, PRStates::TAwaitingParamRequest, MeshMachine::TNoTag)
    56     NODEACTIVITY_ENTRY(MeshMachine::KNoTag, PDPCprStates::TUpdateBundleAndRespondWithRetrievedParams, PRStates::TAwaitingParamRequest, MeshMachine::TNoTag)
   110  * PDP Connection Provider Second Phase Constructor
   103  * PDP Connection Provider Second Phase Constructor
   111  * @param None
   104  * @param None
   112  * @return void
   105  * @return void
   113  */
   106  */
   114 	{
   107 	{
   115 	CCoreConnectionProvider::ConstructL(KPDPCPRPreallocatedActivityBufferSize);
   108 	CCoreConnectionProvider::ConstructL();
   116 	}
   109 	}
   117 
   110 
   118 void CPDPConnectionProvider::StopListener()
   111 void CPDPConnectionProvider::StopListener()
   119 /**
   112 /**
   120  * Start listening for dynamic caps or network mode changes.
   113  * Start listening for dynamic caps or network mode changes.