|
1 /* |
|
2 * ============================================================================ |
|
3 * Name : bluetoothdevicedialogs.h |
|
4 * Part of : bluetoothengine / btnotif |
|
5 * Description : Data structures for passing dialog type and formatting between btnotif and the UI component showing the actual dialogs. Also defines identifiers for Bluetooth device dialogs. |
|
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.2 |
|
21 */ |
|
22 |
|
23 #ifndef BLUETOOTHDEVICEDIALOGS_H |
|
24 #define BLUETOOTHDEVICEDIALOGS_H |
|
25 |
|
26 #include <btdevice.h> |
|
27 |
|
28 /** Enumeration for the type of notification to be launched. */ |
|
29 enum TBTDialogResourceId |
|
30 { |
|
31 ENoResource, |
|
32 EAuthorization, |
|
33 EIncomingPairing, |
|
34 EPinInput, |
|
35 ENumericComparison, |
|
36 EPasskeyDisplay, |
|
37 EObexPasskeyInput, |
|
38 ESetTrusted, |
|
39 EBlockUnpairedDevice, |
|
40 EBlockPairedDevice, |
|
41 EPairingSuccess, |
|
42 EPairingFailure, |
|
43 EVisibilityTimeout, |
|
44 EUnusedResource // The last ID |
|
45 }; |
|
46 |
|
47 |
|
48 /** |
|
49 * TBluetoothDialogParams contains device dialog parameters except for device name and type |
|
50 * |
|
51 * @since Symbian^4 |
|
52 */ |
|
53 NONSHARABLE_CLASS( TBluetoothDialogParams ) |
|
54 { |
|
55 |
|
56 public: |
|
57 |
|
58 /** Enumeration for the type of notification to be launched. */ |
|
59 enum TBTDialogType |
|
60 { |
|
61 EInvalidDialog, |
|
62 ENote, |
|
63 EQuery, |
|
64 EInput, |
|
65 EDeviceSearch, |
|
66 EGlobalNotif |
|
67 }; |
|
68 |
|
69 /** Enumeration for the notification parameters data type to be configured. */ |
|
70 enum TDialogDataType |
|
71 { |
|
72 ENoParams, |
|
73 EDialogType, |
|
74 EResource, |
|
75 EAddress, |
|
76 EDialogTitle, |
|
77 EDialogExt // Id for first data type of derived class. |
|
78 }; |
|
79 |
|
80 inline TBluetoothDialogParams(); |
|
81 |
|
82 public: // data |
|
83 |
|
84 /** |
|
85 * Identifier for the type of notification. |
|
86 */ |
|
87 TInt iDialogType; |
|
88 |
|
89 /** |
|
90 * Identifier for the resource to be shown in the dialog. |
|
91 */ |
|
92 TInt iResourceId; |
|
93 |
|
94 /** |
|
95 * Address of the remote device (not used, for future extension). |
|
96 */ |
|
97 TBTDevAddr iAddr; |
|
98 |
|
99 /** |
|
100 * Unused padding (not used, for future extension). |
|
101 */ |
|
102 TUint32 iPadding; |
|
103 |
|
104 }; |
|
105 |
|
106 |
|
107 /** |
|
108 * TBluetoothDeviceDialog contains more device dialog parameters |
|
109 * |
|
110 * @since Symbian^4 |
|
111 */ |
|
112 NONSHARABLE_CLASS( TBluetoothDeviceDialog ) : public TBluetoothDialogParams |
|
113 { |
|
114 |
|
115 public: |
|
116 |
|
117 /** Enumeration for the notification parameters data type to be configured. */ |
|
118 enum TDialogDataType |
|
119 { |
|
120 ENoParams = TBluetoothDialogParams::EDialogExt, |
|
121 EDeviceName, |
|
122 EDeviceClass, |
|
123 EAdditionalInt, |
|
124 EAdditionalDesc |
|
125 }; |
|
126 |
|
127 inline TBluetoothDeviceDialog(); |
|
128 |
|
129 public: // data |
|
130 |
|
131 /** |
|
132 * The name of the remote device. |
|
133 */ |
|
134 TBTDeviceName iDeviceName; |
|
135 |
|
136 /** |
|
137 * The class of device of the remote device. |
|
138 */ |
|
139 TInt iDeviceClass; |
|
140 |
|
141 /** |
|
142 * Additional data depending on the resource. |
|
143 */ |
|
144 TInt iIntParam; |
|
145 |
|
146 /** |
|
147 * Additional data depending on the resource. |
|
148 */ |
|
149 TBuf<10> iDescParam; |
|
150 |
|
151 }; |
|
152 |
|
153 |
|
154 /** Typedef'ed pckgbuf to send dialog parameters to the notification framework. */ |
|
155 typedef TPckgBuf<TBluetoothDialogParams> TBluetoothDialogParamsPckg; |
|
156 |
|
157 /** Typedef'ed pckgbuf to send dialog parameters to the notification framework. */ |
|
158 typedef TPckgBuf<TBluetoothDeviceDialog> TBluetoothDeviceDialogPckg; |
|
159 |
|
160 |
|
161 inline TBluetoothDialogParams::TBluetoothDialogParams() |
|
162 : iDialogType( EInvalidDialog ), |
|
163 iResourceId( ENoResource ), |
|
164 iAddr( TBTDevAddr() ), |
|
165 iPadding( 0 ) |
|
166 { |
|
167 } |
|
168 |
|
169 inline TBluetoothDeviceDialog::TBluetoothDeviceDialog() |
|
170 : iDeviceName( 0 ), |
|
171 iDeviceClass( 0 ), |
|
172 iIntParam( 0 ) |
|
173 { |
|
174 } |
|
175 |
|
176 |
|
177 #endif // BLUETOOTHDEVICEDIALOGS_H |