1 /* |
|
2 * ============================================================================ |
|
3 * Name : btnotifwrapperproxy.cpp |
|
4 * Part of : bluetoothengine / btnotifwrapper |
|
5 * Description : ECOM plug-in entry implementation. |
|
6 * |
|
7 * Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 * All rights reserved. |
|
9 * This component and the accompanying materials are made available |
|
10 * under the terms of "Eclipse Public License v1.0" |
|
11 * which accompanies this distribution, and is available |
|
12 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 * |
|
14 * Initial Contributors: |
|
15 * Nokia Corporation - initial contribution. |
|
16 * |
|
17 * Contributors: |
|
18 * Nokia Corporation |
|
19 * ============================================================================ |
|
20 * Template version: 4.1 |
|
21 */ |
|
22 |
|
23 |
|
24 #include <ecom/implementationproxy.h> |
|
25 #include <btmanclient.h> |
|
26 #include <btextnotifiers.h> |
|
27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
28 #include <btextnotifierspartner.h> |
|
29 #endif |
|
30 #include <btnotifierapi.h> |
|
31 //#include <networking/panuiinterfaces.h> |
|
32 |
|
33 #include "btnotifwrapper.h" |
|
34 |
|
35 /** Granularity for constructing the array of notifiers */ |
|
36 const TInt KBTNotifWrapperArraySize = 11; |
|
37 /** Channel for discovery notifiers */ |
|
38 const TUid KBTDiscoveryChannel = { 0x00000601 }; |
|
39 /** Channel for authentication and authorisation notifiers */ |
|
40 const TUid KBTAuthChannel = {0x00000602}; |
|
41 /** Channel for OBEX passkey notifiers */ |
|
42 //const TUid KBTObexAuthChannel = {0x00000603}; |
|
43 /** Channel for power mode query */ |
|
44 //const TUid KBTPowerModeChannel = {0x00000605}; |
|
45 /** Channel for query notifiers */ |
|
46 //const TUid KBTQueryChannel = {0x00000606}; |
|
47 /** Channel for power mode query */ |
|
48 //const TUid KBTInfoChannel = {0x00000610}; |
|
49 |
|
50 |
|
51 // ======== LOCAL FUNCTIONS ======== |
|
52 |
|
53 // --------------------------------------------------------------------------- |
|
54 // ?description |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 void CreateAndAppendNotifierLC( CArrayPtr<MEikSrvNotifierBase2>& aArray, |
|
58 const TUid& aUid, const TUid& aChannel ) |
|
59 { |
|
60 CBTNotifWrapper* notifier = CBTNotifWrapper::NewLC( aUid, aChannel ); |
|
61 aArray.AppendL( notifier ); |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------------------------- |
|
65 // ?description |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 CArrayPtr<MEikSrvNotifierBase2>* CreateNotifierArrayL() |
|
69 { |
|
70 CArrayPtrFlat<MEikSrvNotifierBase2>* notifiers = |
|
71 new( ELeave ) CArrayPtrFlat<MEikSrvNotifierBase2>( KBTNotifWrapperArraySize ); |
|
72 CleanupStack::PushL( notifiers ); |
|
73 // Create all the notifiers: |
|
74 // Connection authorization notifier |
|
75 CreateAndAppendNotifierLC( *notifiers, KBTManAuthNotifierUid, KBTAuthChannel ); |
|
76 // Old and new PIN notifiers |
|
77 CreateAndAppendNotifierLC( *notifiers, KBTManPinNotifierUid, KBTAuthChannel ); |
|
78 CreateAndAppendNotifierLC( *notifiers, KBTPinCodeEntryNotifierUid, KBTAuthChannel ); |
|
79 // Secure simple pairing notifiers |
|
80 CreateAndAppendNotifierLC( *notifiers, KBTNumericComparisonNotifierUid, KBTAuthChannel ); |
|
81 CreateAndAppendNotifierLC( *notifiers, KBTPasskeyDisplayNotifierUid, KBTAuthChannel ); |
|
82 |
|
83 // todo: add |
|
84 // KBTUserConfirmationNotifierUid for incoming JW dedicated bonding. |
|
85 |
|
86 CreateAndAppendNotifierLC( *notifiers, KDeviceSelectionNotifierUid, KBTDiscoveryChannel ); |
|
87 |
|
88 /* |
|
89 * todo: |
|
90 * Other notifiers to be migrated: |
|
91 * |
|
92 * existing stack notifiers: |
|
93 * CreateAndAppendNotifierL( aArray, KPbapAuthNotifierUid, KBTObexPINChannel ); |
|
94 * |
|
95 * S60 SDK API: |
|
96 * CreateAndAppendNotifierL( aArray, KPowerModeSettingNotifierUid, KBTPowerModeChannel ); |
|
97 * |
|
98 * S60-defined platform: |
|
99 * CreateAndAppendNotifierL( aArray, KBTObexPasskeyQueryNotifierUid, KBTObexPINChannel ); |
|
100 * CreateAndAppendNotifierL( aArray, KBTGenericInfoNotifierUid, KBTInfoChannel ); |
|
101 * CreateAndAppendNotifierL( aArray, KBTGenericQueryNotifierUid, KBTQueryChannel ); |
|
102 * |
|
103 * new (PAN-related): |
|
104 * CreateAndAppendNotifierL( aArray, KBTPanDeviceSelectionNotifierUid, KBTDiscoveryChannel ); |
|
105 * CreateAndAppendNotifierL( aArray, KBTPanNapUplinkAuthorisationNotifierUid, KBTAuthChannel ); |
|
106 */ |
|
107 CleanupStack::Pop( notifiers->Count() + 1, notifiers ); // Each notifier + notifier array itself |
|
108 return notifiers; |
|
109 } |
|
110 |
|
111 // --------------------------------------------------------------------------- |
|
112 // ECOM entry point. |
|
113 // --------------------------------------------------------------------------- |
|
114 // |
|
115 const TImplementationProxy ImplementationTable[] = |
|
116 { |
|
117 IMPLEMENTATION_PROXY_ENTRY( 0x20026FEE, CreateNotifierArrayL ) |
|
118 }; |
|
119 |
|
120 // ======== GLOBAL FUNCTIONS ======== |
|
121 |
|
122 // --------------------------------------------------------------------------- |
|
123 // ECOM factory method. |
|
124 // --------------------------------------------------------------------------- |
|
125 // |
|
126 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) |
|
127 { |
|
128 aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); |
|
129 return ImplementationTable; |
|
130 } |
|