|
1 // Copyright (c) 2006-2009 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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #include <bluetooth/hci/hcicmdqueuedecisionplugin.h> |
|
22 #include <bluetooth/hci/hcicmdqueuedecisioninterface.h> |
|
23 #include <bluetooth/logger.h> |
|
24 #include <bluetooth/hci/hciutil.h> |
|
25 |
|
26 #include <bluetooth/hci/qdpbase.hrh> |
|
27 |
|
28 #ifdef __FLOG_ACTIVE |
|
29 _LIT8(KLogComponent, LOG_COMPONENT_QDP_BASE); |
|
30 #endif |
|
31 |
|
32 /** |
|
33 Static factory method for the HCI Command Queue Decision plugin |
|
34 |
|
35 @param aImplementationUid The implementation UID. |
|
36 @return Ownership of a new QDP plugin. |
|
37 */ |
|
38 EXPORT_C /*static*/ CHCICmdQueueDecisionPlugin* CHCICmdQueueDecisionPlugin::NewL(TUid aImplementationUid) |
|
39 { |
|
40 LOG_STATIC_FUNC |
|
41 |
|
42 CHCICmdQueueDecisionPlugin* self = reinterpret_cast<CHCICmdQueueDecisionPlugin*> ( |
|
43 CHciUtil::LoadImplementationL(TUid::Uid(KHCICmdQueueDecisionEcomInterfaceUid), |
|
44 aImplementationUid, |
|
45 _FOFF(CHCICmdQueueDecisionPlugin, iInstanceId)) |
|
46 ); |
|
47 return self; |
|
48 } |
|
49 |
|
50 /** |
|
51 Static factory method for the HCI Command Queue Decision plugin |
|
52 |
|
53 This method will attempt to load a single instance of an implementation for |
|
54 the correct interface. |
|
55 |
|
56 @internalComponent |
|
57 @return Ownership of a new core HCI plugin. |
|
58 */ |
|
59 EXPORT_C CHCICmdQueueDecisionPlugin* CHCICmdQueueDecisionPlugin::NewL() |
|
60 { |
|
61 LOG_STATIC_FUNC |
|
62 |
|
63 CHCICmdQueueDecisionPlugin* self = reinterpret_cast<CHCICmdQueueDecisionPlugin*> ( |
|
64 CHciUtil::LoadImplementationL(TUid::Uid(KHCICmdQueueDecisionEcomInterfaceUid), |
|
65 _FOFF(CHCICmdQueueDecisionPlugin, iInstanceId)) |
|
66 ); |
|
67 return self; |
|
68 } |
|
69 |
|
70 /** |
|
71 Destructor. |
|
72 All ECom interfaces obtained through the Interface will be deleted. |
|
73 */ |
|
74 EXPORT_C CHCICmdQueueDecisionPlugin::~CHCICmdQueueDecisionPlugin() |
|
75 { |
|
76 LOG_FUNC |
|
77 |
|
78 CHciUtil::DestroyedImplementation(iInstanceId); |
|
79 CLOSE_LOGGER |
|
80 } |
|
81 |
|
82 /** |
|
83 Private Constructor |
|
84 */ |
|
85 EXPORT_C CHCICmdQueueDecisionPlugin::CHCICmdQueueDecisionPlugin() |
|
86 { |
|
87 CONNECT_LOGGER |
|
88 LOG_FUNC |
|
89 } |