|
1 /* |
|
2 * Copyright (c) 2007 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: Plugin loader |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef BTUIPLUGINMAN_H |
|
21 #define BTUIPLUGINMAN_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <btdevice.h> |
|
25 #include "BtuiPluginInterface.h" |
|
26 #include "btdevmodel.h" |
|
27 |
|
28 typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray; |
|
29 typedef RPointerArray<CBtuiPluginInterface> RPluginPtrArray; |
|
30 |
|
31 /** |
|
32 * Class CBTUIPluginMan |
|
33 * |
|
34 * Load plugins of CBtuiPluginInterface |
|
35 * |
|
36 * @since S60 v5.0 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CBTUIPluginMan ) |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phase constructor |
|
45 * |
|
46 * @since S60 v5.0 |
|
47 */ |
|
48 static CBTUIPluginMan* NewL( CAknViewAppUi* aAppUi ); |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 */ |
|
53 virtual ~CBTUIPluginMan(); |
|
54 |
|
55 /** |
|
56 * Get the setting view. |
|
57 * @param TBTDevice Get this device's view |
|
58 * @return CAknView the view of the specified plugin |
|
59 */ |
|
60 CAknView* GetSettingViewL(TBTDevice& aDevice); |
|
61 |
|
62 /** |
|
63 * Check if the plug-in for specified HID device exists. |
|
64 * @param TBTDeviceClass Use ClassOfDevice as the property to search |
|
65 * @return ETrue if exist, otherwise EFalse. |
|
66 */ |
|
67 TBool IsPluginAvaiable(TBTDeviceClass aDeviceClassInfo); |
|
68 |
|
69 private: |
|
70 |
|
71 /** |
|
72 * C++ default constructor |
|
73 * |
|
74 * @since S60 v5.0 |
|
75 */ |
|
76 CBTUIPluginMan( CAknViewAppUi* aAppUi ); |
|
77 |
|
78 /** |
|
79 * Symbian 2nd-phase constructor |
|
80 * |
|
81 * @since S60 v5.0 |
|
82 */ |
|
83 void ConstructL(); |
|
84 |
|
85 /** |
|
86 * Load plugins which are for HID devices. |
|
87 * @param None |
|
88 * @return None |
|
89 */ |
|
90 void LoadPluginsL(); |
|
91 |
|
92 private: // data |
|
93 |
|
94 /** |
|
95 * Array of pointers to ECom plug-in information objects. |
|
96 */ |
|
97 RImplInfoPtrArray iPluginInfoArray; |
|
98 |
|
99 /** |
|
100 * Array of pointers to the BtuiPluginInterface ECom plug-ins loaded by PairedView. |
|
101 */ |
|
102 RPluginPtrArray iPluginArray; |
|
103 |
|
104 /** |
|
105 * Current Application process |
|
106 */ |
|
107 CAknViewAppUi* iAppUi; |
|
108 }; |
|
109 |
|
110 |
|
111 #endif // BTUIPLUGINMAN_H |