|
1 /* |
|
2 * Copyright (c) 2008 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: Declares the setting view for keyboard device. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTHIDSETTINGVIEW_H |
|
20 #define BTHIDSETTINGVIEW_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <aknview.h> // AVKON components |
|
25 #include <akncontext.h> |
|
26 #include <eikmenup.h> // Menu pane definitions |
|
27 #include <ConeResLoader.h> |
|
28 #include <btdevice.h> |
|
29 #include "BtuiPluginInterface.h" |
|
30 #include "bthidsettings.h" |
|
31 #include "bthidsettinglist.h" |
|
32 #include "bthidcenrepwatcher.h" |
|
33 // FORWARD DECLARATIONS |
|
34 class CBTHidSettingContainer; |
|
35 class CBTKeySettingList; |
|
36 #include "bthidsettings.h" |
|
37 #include "layoutmgr.h" |
|
38 #include "hidlayoutids.h" |
|
39 // CONSTANTS |
|
40 _LIT(KFileDrive,"z:"); |
|
41 _LIT(KResourceFileName, "BthidResource.rsc"); |
|
42 |
|
43 // CLASS DECLARATION |
|
44 |
|
45 /** |
|
46 * Main view of the application. Handles view activation, |
|
47 * deactivation, commands and dynamic options menus. |
|
48 */ |
|
49 class CBtHidSettingView : public CBtuiPluginInterface, |
|
50 public MBtHidCenRepObserver |
|
51 { |
|
52 public: |
|
53 // Constructors and destructor |
|
54 |
|
55 /** |
|
56 * ECOM implementation instantiation function of |
|
57 * interface "CBtuiPluginInterface", to be used by BtuiPairedView. |
|
58 */ |
|
59 static CBtHidSettingView* NewBtuiPluginL( /* TAny* aAppUi */); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 virtual ~CBtHidSettingView(); |
|
65 |
|
66 protected: |
|
67 |
|
68 /** |
|
69 * C++ default constructor. |
|
70 */ |
|
71 CBtHidSettingView(/* CAknViewAppUi* aAppUi */); |
|
72 |
|
73 /** |
|
74 * Symbian 2nd phase constructor. |
|
75 */ |
|
76 void ConstructL(); |
|
77 |
|
78 public: |
|
79 // Functions from base classes |
|
80 |
|
81 /** |
|
82 * From CAknView Returns view id. |
|
83 * @param None. |
|
84 * @return View id. |
|
85 */ |
|
86 TUid Id() const; |
|
87 |
|
88 /** |
|
89 * From CAknView Handles user commands. |
|
90 * @param aCommand A command id. |
|
91 * @return None. |
|
92 */ |
|
93 void HandleCommandL(TInt aCommand); |
|
94 void CenRepDataChanged(TUid& aUid, TUint32 aKey); |
|
95 |
|
96 private: |
|
97 // Functions from base classes |
|
98 |
|
99 /** |
|
100 * From CAknView Activates view. |
|
101 * @param aPrevViewId Id of previous view. |
|
102 * @param aCustomMessageId Custom message id. |
|
103 * @param aCustomMessage Custom message. |
|
104 * @return None. |
|
105 */ |
|
106 void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, |
|
107 const TDesC8& aCustomMessage); |
|
108 |
|
109 /** |
|
110 * From CAknView Deactivates view. |
|
111 * @param None. |
|
112 * @return None. |
|
113 */ |
|
114 void DoDeactivate(); |
|
115 |
|
116 /** |
|
117 * From CAknView Dynamically initialises options menu. |
|
118 * @param aResourceId Id identifying the menu pane to initialise. |
|
119 * @param aMenuPane The in-memory representation of the menu pane. |
|
120 * @return None. |
|
121 */ |
|
122 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
123 |
|
124 public: |
|
125 // New functions |
|
126 |
|
127 |
|
128 private: |
|
129 |
|
130 /** |
|
131 * Creates List Box |
|
132 */ |
|
133 void CreateSettingListL(); |
|
134 THidKeyboardLayoutId CurrentLayoutL() const; |
|
135 |
|
136 void SetNavipaneTextL(const TDesC8& aDeviceName); |
|
137 |
|
138 public: |
|
139 void SetCurrentLayoutL(THidKeyboardLayoutId aLayoutValue); |
|
140 |
|
141 private: |
|
142 // Data |
|
143 CBTHidSettingContainer* iContainer; |
|
144 CBtHidSettings* iSettings; // Settings handler class |
|
145 CBTKeySettingList* iSettingList; // The settings-list list view |
|
146 |
|
147 //CIdle* iIdle; // Idle time class (for doing operation delayed) |
|
148 TVwsViewId iPrevViewId; // Previous view of GS app. |
|
149 TInt iResourceFileFlag; // Flag for eikon env. |
|
150 CEikonEnv* iEikEnv; |
|
151 |
|
152 /*! The Layout Manager Server session */ |
|
153 RLayoutManager iLayoutSession; |
|
154 |
|
155 /*! The last keyboard layout selected by the user */ |
|
156 THidKeyboardLayoutId iLastSelectedLayout; |
|
157 TBool iIsNokiaKeyboard; |
|
158 /** |
|
159 * Needed when creating navipane text |
|
160 * Own this pointer |
|
161 */ |
|
162 CAknNavigationDecorator* iNaviDecorator; |
|
163 CAknContextPane* iContextPane; |
|
164 CBtHidCenRepWatcher* iCenRepWatcher; |
|
165 |
|
166 }; |
|
167 |
|
168 #endif // BTHIDSETTINGVIEW_H |
|
169 // End of File |