equal
deleted
inserted
replaced
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2006-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". |
55 return p; |
55 return p; |
56 } |
56 } |
57 |
57 |
58 void CCoreHCIPluginImpl::ConstructL() |
58 void CCoreHCIPluginImpl::ConstructL() |
59 /* |
59 /* |
60 Start up the HCTL plugin, then the initialisation plugin, as per the information |
60 Start up the HCTL plugin, then the initialisation plugin. |
61 in section 2.3 of PREQ750_Improvements document. |
|
62 */ |
61 */ |
63 { |
62 { |
64 LOG_FUNC |
63 LOG_FUNC |
65 |
64 |
66 // Create HCI Utility library |
65 // Create HCI Utility library |
146 |
145 |
147 CCoreHCIPluginImpl::~CCoreHCIPluginImpl() |
146 CCoreHCIPluginImpl::~CCoreHCIPluginImpl() |
148 { |
147 { |
149 LOG_FUNC |
148 LOG_FUNC |
150 |
149 |
151 //delete in the order given in section 2.4 of PREQ750_Improvements document |
150 //delete in the correct order |
152 delete iInitialisationPlugin; |
151 delete iInitialisationPlugin; |
153 delete iHCTLPlugin; |
152 delete iHCTLPlugin; |
154 delete iHCIServer; |
153 delete iHCIServer; |
155 delete iHciUtil; |
154 delete iHciUtil; |
156 } |
155 } |
224 ret = reinterpret_cast<TAny*>(static_cast<MHardResetInitiator*>(this)); |
223 ret = reinterpret_cast<TAny*>(static_cast<MHardResetInitiator*>(this)); |
225 break; |
224 break; |
226 } |
225 } |
227 |
226 |
228 case KHCTLInterfaceUid: |
227 case KHCTLInterfaceUid: |
229 { |
228 { |
230 ret = iHCTLPlugin->Interface(aUid); |
229 ret = iHCTLPlugin->Interface(aUid); |
231 break; |
230 break; |
232 } |
231 } |
233 |
232 |
234 case KControllerInitialisationInterfaceUid: |
233 case KControllerInitialisationInterfaceUid: |
237 { |
236 { |
238 ret = iInitialisationPlugin->Interface(aUid); |
237 ret = iInitialisationPlugin->Interface(aUid); |
239 } |
238 } |
240 break; |
239 break; |
241 } |
240 } |
242 |
241 |
243 case KHCIClientUsageCallbackUid: |
242 case KHCIClientUsageCallbackUid: |
244 { |
243 { |
245 ret = reinterpret_cast<TAny*>(static_cast<MHCIClientUsageCallback*>(this)); |
244 ret = reinterpret_cast<TAny*>(static_cast<MHCIClientUsageCallback*>(this)); |
246 break; |
245 break; |
247 } |
246 } |
445 |
444 |
446 void CCoreHCIPluginImpl::MchSetChannelObserver(MHCTLChannelObserver& aHCIChannelObserver) |
445 void CCoreHCIPluginImpl::MchSetChannelObserver(MHCTLChannelObserver& aHCIChannelObserver) |
447 { |
446 { |
448 LOG_FUNC |
447 LOG_FUNC |
449 __ASSERT_DEBUG(!iHCTLChannelObserver, PANIC(KCoreHciPanicCat, EInterfaceAlreadyInitialised)); |
448 __ASSERT_DEBUG(!iHCTLChannelObserver, PANIC(KCoreHciPanicCat, EInterfaceAlreadyInitialised)); |
450 |
449 |
451 iHCTLChannelObserver = &aHCIChannelObserver; |
450 iHCTLChannelObserver = &aHCIChannelObserver; |
|
451 // Inform observer of current state (if one is ready). |
|
452 if(iHCTLChannelState) |
|
453 { |
|
454 iHCTLChannelObserver->MhcoChannelOpen(iHCTLChannelState); |
|
455 } |
452 } |
456 } |
453 |
457 |
454 void CCoreHCIPluginImpl::MchSetControllerStateObserver(MControllerStateObserver& aControllerStateObserver) |
458 void CCoreHCIPluginImpl::MchSetControllerStateObserver(MControllerStateObserver& aControllerStateObserver) |
455 { |
459 { |
456 LOG_FUNC |
460 LOG_FUNC |
468 |
472 |
469 void CCoreHCIPluginImpl::MhcoChannelOpen(THCITransportChannel aChannels) |
473 void CCoreHCIPluginImpl::MhcoChannelOpen(THCITransportChannel aChannels) |
470 { |
474 { |
471 LOG_FUNC |
475 LOG_FUNC |
472 |
476 |
473 // Just pass on to the upper HCLT channel observer. |
477 iHCTLChannelState |= aChannels; |
474 iHCTLChannelObserver->MhcoChannelOpen(aChannels); |
478 LOG1(_L("\tiHCTLChannelObserver = 0x%08x"), iHCTLChannelObserver) |
|
479 if(iHCTLChannelObserver) |
|
480 { |
|
481 iHCTLChannelObserver->MhcoChannelOpen(aChannels); |
|
482 } |
|
483 |
475 } |
484 } |
476 |
485 |
477 void CCoreHCIPluginImpl::MhcoChannelClosed(THCITransportChannel aChannels) |
486 void CCoreHCIPluginImpl::MhcoChannelClosed(THCITransportChannel aChannels) |
478 { |
487 { |
479 LOG_FUNC |
488 LOG_FUNC |
480 |
489 |
481 // Just pass on to the upper HCTL channel observer. |
490 iHCTLChannelState &= ~aChannels; |
482 iHCTLChannelObserver->MhcoChannelClosed(aChannels); |
491 LOG1(_L("\tiHCTLChannelObserver = 0x%08x"), iHCTLChannelObserver) |
|
492 if(iHCTLChannelObserver) |
|
493 { |
|
494 iHCTLChannelObserver->MhcoChannelClosed(aChannels); |
|
495 } |
483 } |
496 } |
484 |
497 |
485 void CCoreHCIPluginImpl::MhcucSetClientUsage(MHCIClientUsage& aClientUsage) |
498 void CCoreHCIPluginImpl::MhcucSetClientUsage(MHCIClientUsage& aClientUsage) |
486 { |
499 { |
487 LOG_FUNC |
500 LOG_FUNC |