73 CPDPTierManager::CPDPTierManager(ESock::CTierManagerFactoryBase& aFactory, |
73 CPDPTierManager::CPDPTierManager(ESock::CTierManagerFactoryBase& aFactory, |
74 const MeshMachine::TNodeActivityMap& aActivityMap) |
74 const MeshMachine::TNodeActivityMap& aActivityMap) |
75 :CCoreTierManager(aFactory,aActivityMap) |
75 :CCoreTierManager(aFactory,aActivityMap) |
76 { |
76 { |
77 LOG_NODE_CREATE(KPDPTierMgrTag, CPDPTierManager); |
77 LOG_NODE_CREATE(KPDPTierMgrTag, CPDPTierManager); |
|
78 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_CONSTRUCTOR_1, "Constructor"); |
78 } |
79 } |
79 |
80 |
80 /** |
81 /** |
81 Descructor for CPDPTierManager |
82 Descructor for CPDPTierManager |
82 */ |
83 */ |
83 CPDPTierManager::~CPDPTierManager() |
84 CPDPTierManager::~CPDPTierManager() |
84 { |
85 { |
85 LOG_NODE_DESTROY(KPDPTierMgrTag, CPDPTierManager); |
86 LOG_NODE_DESTROY(KPDPTierMgrTag, CPDPTierManager); |
86 |
87 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_DESTRUCTOR_1, "Destructor"); |
87 #ifdef SYMBIAN_NETWORKING_CONTENTION_MANAGEMENT |
88 #ifdef SYMBIAN_NETWORKING_CONTENTION_MANAGEMENT |
88 delete iPdpContentionManager; |
89 delete iPdpContentionManager; |
89 iPdpContentionManager = NULL; |
90 iPdpContentionManager = NULL; |
90 #endif |
91 #endif |
91 |
92 |
122 The PacketServiceAttachedCallbackL is a callback function. |
123 The PacketServiceAttachedCallbackL is a callback function. |
123 It's called by MBMSEngine when RPacketService has been attached. |
124 It's called by MBMSEngine when RPacketService has been attached. |
124 */ |
125 */ |
125 void CPDPTierManager::PacketServiceAttachedCallbackL() |
126 void CPDPTierManager::PacketServiceAttachedCallbackL() |
126 { |
127 { |
127 |
|
128 #ifdef SYMBIAN_NETWORKING_CONTENTION_MANAGEMENT |
128 #ifdef SYMBIAN_NETWORKING_CONTENTION_MANAGEMENT |
|
129 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_PACKETSERVICEATTACHEDCALLBACKL_1, "Starting PDP Contention Manager"); |
129 if (!iPdpContentionManager) |
130 if (!iPdpContentionManager) |
130 { |
131 { |
131 iPdpContentionManager = CPdpContentionManager::NewL(*this, iMBMSEngine->GetRPacketService()); |
132 iPdpContentionManager = CPdpContentionManager::NewL(*this, iMBMSEngine->GetRPacketService()); |
132 } |
133 } |
133 static_cast<CPdpContentionManager*>(iPdpContentionManager)->StartMonitoringL(); |
134 static_cast<CPdpContentionManager*>(iPdpContentionManager)->StartMonitoringL(); |
140 @param aCFMessage The reference to Messages::TSignatureBase |
141 @param aCFMessage The reference to Messages::TSignatureBase |
141 @return TInt* |
142 @return TInt* |
142 */ |
143 */ |
143 void CPDPTierManager::ReceivedL(const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage) |
144 void CPDPTierManager::ReceivedL(const TRuntimeCtxId& aSender, const TNodeId& aRecipient, TSignatureBase& aMessage) |
144 { |
145 { |
|
146 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_RECEIVEDL_1, "Realm Id [%u] Message Id [%u]", aMessage.MessageId().Realm(), aMessage.MessageId().MessageId()); |
145 //TODO I think that the generic TCancel handling will do this - so perhaps remove this and CancelAndRemoveFromRequestList! |
147 //TODO I think that the generic TCancel handling will do this - so perhaps remove this and CancelAndRemoveFromRequestList! |
146 if (aMessage.IsMessage<TEBase::TCancel>()) |
148 if (aMessage.IsMessage<TEBase::TCancel>()) |
147 { |
149 { |
|
150 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_RECEIVEDL_2, "Received Message Type: TEBase::TCancel"); |
148 TRAPD(err, iMBMSEngine->CancelAndRemoveFromRequestListL(aSender)); |
151 TRAPD(err, iMBMSEngine->CancelAndRemoveFromRequestListL(aSender)); |
149 if (err == KErrNone) |
152 if (err == KErrNone) |
150 { |
153 { |
151 aMessage.ClearMessageId(); |
154 aMessage.ClearMessageId(); |
152 } |
155 } |
159 // It will be processed by core TM then. |
162 // It will be processed by core TM then. |
160 } |
163 } |
161 |
164 |
162 if (aMessage.IsMessage<TCFTierStatusProvider::TTierNotificationRegistration>()) |
165 if (aMessage.IsMessage<TCFTierStatusProvider::TTierNotificationRegistration>()) |
163 { |
166 { |
|
167 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_RECEIVEDL_3, "Received Message Type: TCFTierStatusProvider::TTierNotificationRegistration"); |
164 TCFTierStatusProvider::TTierNotificationRegistration* msgTNR = message_cast<TCFTierStatusProvider::TTierNotificationRegistration>(&aMessage); |
168 TCFTierStatusProvider::TTierNotificationRegistration* msgTNR = message_cast<TCFTierStatusProvider::TTierNotificationRegistration>(&aMessage); |
165 |
169 |
166 const Messages::TNodeSignal::TMessageId requestType = TCFTierStatusProvider::TTierNotificationRegistration::Id(); |
170 const Messages::TNodeSignal::TMessageId requestType = TCFTierStatusProvider::TTierNotificationRegistration::Id(); |
167 CRefCountOwnedParameterBundle* requestBundleOwner = msgTNR->iBundle; |
171 CRefCountOwnedParameterBundle* requestBundleOwner = msgTNR->iBundle; |
168 |
172 |
187 |
191 |
188 #ifdef SYMBIAN_NETWORKING_CONTENTION_MANAGEMENT |
192 #ifdef SYMBIAN_NETWORKING_CONTENTION_MANAGEMENT |
189 |
193 |
190 TBool CPDPTierManager::HandleContentionL(ESock::CMetaConnectionProviderBase* aMcpr, Messages::TNodeId& aPendingCprId, TUint aPriority) |
194 TBool CPDPTierManager::HandleContentionL(ESock::CMetaConnectionProviderBase* aMcpr, Messages::TNodeId& aPendingCprId, TUint aPriority) |
191 { |
195 { |
|
196 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CPDPTIERMANAGER_HANDLECONTENTIONL_1, "Handle Contention Request"); |
192 User::LeaveIfNull(iMBMSEngine); |
197 User::LeaveIfNull(iMBMSEngine); |
193 if (!iPdpContentionManager) |
198 if (!iPdpContentionManager) |
194 { |
199 { |
195 iPdpContentionManager = CPdpContentionManager::NewL(*this, iMBMSEngine->GetRPacketService()); |
200 iPdpContentionManager = CPdpContentionManager::NewL(*this, iMBMSEngine->GetRPacketService()); |
196 } |
201 } |