|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: BT Bearer plugin implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "btpluginprovider.h" |
|
21 #include "btpluginnotifier.h" |
|
22 #include "debug.h" |
|
23 |
|
24 |
|
25 // ======== MEMBER FUNCTIONS ======== |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 // C++ default constructor |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 CBTBearerPlugin::CBTBearerPlugin( TLocodBearerPluginParams& aParam ) |
|
32 : CLocodBearerPlugin( aParam ) |
|
33 { |
|
34 } |
|
35 |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // Symbian 2nd-phase constructor |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 void CBTBearerPlugin::ConstructL() |
|
42 { |
|
43 TRACE_FUNC_ENTRY |
|
44 iBTPluginNotifier = CBTPluginNotifier::NewL( Observer(), |
|
45 KCRUidBluetoothPowerState, |
|
46 CBTPluginNotifier::EKeyInt, |
|
47 KBTPowerState ); |
|
48 TRACE_FUNC_EXIT |
|
49 } |
|
50 |
|
51 |
|
52 // --------------------------------------------------------------------------- |
|
53 // NewL |
|
54 // --------------------------------------------------------------------------- |
|
55 // |
|
56 CBTBearerPlugin* CBTBearerPlugin::NewL( TLocodBearerPluginParams& aParam ) |
|
57 { |
|
58 CBTBearerPlugin* self = new( ELeave ) CBTBearerPlugin( aParam ); |
|
59 CleanupStack::PushL( self ); |
|
60 self->ConstructL(); |
|
61 CleanupStack::Pop(); |
|
62 return self; |
|
63 } |
|
64 |
|
65 |
|
66 // --------------------------------------------------------------------------- |
|
67 // Destructor |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 CBTBearerPlugin::~CBTBearerPlugin() |
|
71 { |
|
72 delete iBTPluginNotifier; |
|
73 iBTPluginNotifier = NULL; |
|
74 } |